Tinderbox User-to-User Forum (for formal tech support please email: info@eastgate.com)
http://www.eastgate.com/Tinderbox/forum//YaBB.cgi
Tinderbox Users >> Agent, Actions, Rules & Automation >> Find all instances of a value except in seed notes
http://www.eastgate.com/Tinderbox/forum//YaBB.cgi?num=1472062320

Message started by John Doernberg on Aug 24th, 2016, 2:12pm

Title: Find all instances of a value except in seed notes
Post by John Doernberg on Aug 24th, 2016, 2:12pm

I’m chagrined that I can’t find the answer to this in the forum. I'm creating an agent to find all instances of a particular value within selected attributes. The value is one of a set, and I created seeds notes to list all of the values in the chosen set. I want the agent to find all instances of this particular value *except* from within a prototype or seed note (which is itself a prototype). Every permutation I try keeps returning the seed notes that contain all of the sets' values. Something on the order of:

!=$Prototype & $AttributeA.contains(“abc”)| $AttributeB.contains(“abc”)|$AttributeC.contains(“abc”).

I have a basic understanding that this keeps returning the seed notes because they contain all of the set values for the selected attributes, but I've tried (probably using incorrect syntax) to exclude the parent/container with the seed notes and is nothing has worked. I'm sure I'm missing something very basic. Is there an easy way to accomplish this? Many thanks.

Title: Re: Find all instances of a value except in seed notes
Post by Mark Anderson on Aug 24th, 2016, 4:24pm

!=$Prototype isn't valid syntax so may be throwing false results regardless of the other query terms. To query if an item has no prototype, check that $Prototype has no value:

$Prototype == ""

To query if an item('s original) is not a prototype, test that $IsPrototype is false as it is a Boolean type:

$IsPrototype == false

You are right that a .contains() test will find seed notes (i.e. notes deliberately pre-'seeded' with the values you want to appear in the value pop-up list for a given attribute when shown in the Key Attributes table. So you need a unique identifier to filter it out.  It could be the note's $Name (if it is unique). It could be that is uses a particular prototype, or that it is a prototype (but no other notes of interest are), etc.

What is the identifier you're using for seed note(s)?

Title: Re: Find all instances of a value except in seed notes
Post by Mark Bernstein on Aug 24th, 2016, 7:21pm

"Seed notes" to populate set values were a good idea back in the day, but they're now obsolete.  Instead, you can now specify those values in the User Attribute itself.  Edit the attribute in the inspector, and you'll see a field for Suggested values; just enter your seed values as a semi-colon delimited list and you're set.

Title: Re: Find all instances of a value except in seed notes
Post by John Doernberg on Aug 24th, 2016, 11:44pm

Getting rid of the seed notes and instead using Suggested Values did the trick! I didn't know about that. Thanks very much.

Title: Re: Find all instances of a value except in seed notes
Post by Mark Anderson on Aug 25th, 2016, 3:30am

This was added in 6.4.0, in the Inspector User sub-tab. I'd overlooked this aspect of use and will update the relevant pages, especially this which is now out of date.

Title: Re: Find all instances of a value except in seed notes
Post by Mark Anderson on Aug 31st, 2016, 6:54am

I've updated the aTbref page on pre-populating lists to reflect the new v6.0.0+ option in the Inspector.

Tinderbox User-to-User Forum (for formal tech support please email: info@eastgate.com) » Powered by YaBB 2.2.1!
YaBB © 2000-2008. All Rights Reserved.