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
Checking prototype of parent in query/conditional (Read 5066 times)
Rafter T. Sass
Full Member
*
Offline



Posts: 100
Burlington, VT
Checking prototype of parent in query/conditional
Oct 12th, 2008, 10:12am
 
I can't seem to get the syntax right to do this.

Prototype(parent)="*blah"     doesn't work.




Back to top
 
« Last Edit: Oct 12th, 2008, 10:15am by Rafter T. Sass »  
raughter   IP Logged
Mark Anderson
YaBB Administrator
*
Offline

User - not staff!

Posts: 5689
Southsea, UK
Re: Checking prototype of parent in query/conditional
Reply #1 - Oct 12th, 2008, 10:31am
 
Try testing:

$Prototype(parent)="*blah"
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: Checking prototype of parent in query/conditional
Reply #2 - Oct 12th, 2008, 11:52am
 
In a conditional, you can test the prototype of the parent

    if  (Prototype(parent)=proto){....}

But in a query,

    Prototype(parent)

means that "the attribute Prototype contains the regular expression 'parent'"

You could easily use a rule or OnAdd action to set a User attribute, ParentPrototype, and then test it.


Or, as Mark Anderson notes above, you can use the newer and better query syntax

    $Prototype(parent)="*proto"

Back to top
 
« Last Edit: Oct 12th, 2008, 11:54am by Mark Bernstein »  
WWW   IP Logged
Pages: 1
Send Topic Print