Possible to automatically set Search in destination for Smart Groups?

I’ve created a template, which contains various order groups and subgroups I typically use for projects. I’ve also got a set of Smart Groups nested inside my various subgroups.

The problem is, when I create a new project I’ve got to got to all of the Smart Groups and change the destination for the “Search in:” field so that it corresponds to the main parent Group.

Is there any way to automate this so that I can automatically set Smart Group’s “Search in:” destination based on the project-Group name?

Thanks!

Screen captures would be useful.

Here you go…
Screenshot 2024-06-01 at 12.36.43 AM

This is a separate problem from the question I’m raising on the forum (apologies), but I’ve forgotten how to drag-and-drop / copy and paste Smart Groups from DEVONthink to at template residing in the “Templates Folder.” Right now, when I drag-and-drop Smart Groups, they appear as folders not Smart Groups. Could you quickly remind me what to do? Thanks!

You could try Script: Create or change smart group(s)

1 Like

Thanks. I’m a total novice with scripts. Let me ask this…

In the screen shots I provided, you’ll see “TK - R Project” under Search In. That’s just the temporary name that my Template generates, and I then change the name based on the subject of the project. When I look through the script (with an elementary understanding of it), I’m wondering if it would be able to set it up so that the script would change the Search in destination – based on the name I’d assign to the parent project group.

My understanding of scripts is that they’re a fixed and in this context it would be able to make changes to the Smart Groups Search in destination for “TK - R Project,” but not for the proper project name that I would change it to.

Does this make sense? Is there some way to configure a script to make it work for me in the manner that I’ve just described? Thanks!

You are actually trying to describe a smart template, i.e., one that has scripted controls for generating the template.

That being said… here is an option to reuse a smart group in a database, controlled by a smart rule with an Apply Script command…

1 Like

This is precisely what I was looking for! Can you help me put something like this together? Thank you!

I’ve tried to figure this out on my own. Is there already an Apply Script or Apply Script command that’s out there that I can affix to the Smart Group? Or do I have to create it, then store it in the scripts menu,

So, does one just select the Smart Group, go to Tools > Get Info, and under the Get Info pane go to Script > Select… and then navigate to where the script would be that would execute this action?

Thanks!

I’ve tried to figure this out on my own. Is there already an Apply Script or Apply Script command that’s out there that I can affix to the Smart Group?

No and you don’t affix such an action to a smart group. You can use an Apply Script action in a smart rule that targets specific items in a specific location.

Or do I have to create it, then store it in the scripts menu,

This is a possibility if you were going to create multiple smart rules, each targeting a different parent group.

So, does one just select the Smart Group, go to Tools > Get Info, and under the Get Info pane go to Script > Select… and then navigate to where the script would be that would execute this action?

No. That’s for a triggered script and unrelated to smart rules.

Open a separate concise ticket on this particular request. Thanks.

Done. Thanks!