Welcome, Guest. Please Login
Tinderbox
  News:
IMPORTANT MESSAGE! This forum has now been replaced by a new forum at http://forum.eastgate.com and no further posting or member registration is allowed. The forum is still accessible via read-only access for reference purposes. If you wish to discuss content here, please use the new forum. N.B. - posting in the new forum requires a fresh registration in the new forum (sorry - member data can't be ported).
  HomeHelpSearchLogin  
 
Pages: 1
Send Topic Print
Find all instances of a value except in seed notes (Read 1375 times)
John Doernberg
Full Member
*
Offline



Posts: 37

Find all instances of a value except in seed notes
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.
Back to top
 
 
  IP Logged
Mark Anderson
YaBB Administrator
*
Offline

User - not staff!

Posts: 5689
Southsea, UK
Re: Find all instances of a value except in seed notes
Reply #1 - 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)?
Back to top
 
 

--
Mark Anderson
TB user and Wiki Gardener
aTbRef v6
(TB consulting - email me)
WWW shoantel   IP Logged
Mark Bernstein
YaBB Administrator
*
Offline

designer of
Tinderbox

Posts: 2871
Eastgate Systems, Inc.
Re: Find all instances of a value except in seed notes
Reply #2 - 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.
Back to top
 
 
WWW   IP Logged
John Doernberg
Full Member
*
Offline



Posts: 37

Re: Find all instances of a value except in seed notes
Reply #3 - 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.
Back to top
 
 
  IP Logged
Mark Anderson
YaBB Administrator
*
Offline

User - not staff!

Posts: 5689
Southsea, UK
Re: Find all instances of a value except in seed notes
Reply #4 - 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.
Back to top
 
 

--
Mark Anderson
TB user and Wiki Gardener
aTbRef v6
(TB consulting - email me)
WWW shoantel   IP Logged
Mark Anderson
YaBB Administrator
*
Offline

User - not staff!

Posts: 5689
Southsea, UK
Re: Find all instances of a value except in seed notes
Reply #5 - 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.
Back to top
 
 

--
Mark Anderson
TB user and Wiki Gardener
aTbRef v6
(TB consulting - email me)
WWW shoantel   IP Logged
Pages: 1
Send Topic Print