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
Using $attribute(parent) in Agent Action (Read 1992 times)
BCrane
Full Member
*
Offline



Posts: 22

Using $attribute(parent) in Agent Action
Sep 29th, 2015, 11:51am
 
I'm creating a grading rubric and have created an agent so that when a note inside a container is assigned the prototype $p_essay_rubric it will pull its parents attribute values from a couple different attributes to create a value for an attribute I will use during export.

So my agent is querying the correct notes. The action is not working as I expect it to. Right now I have:

$RubricExportFileName=$s_IDNumber(parent)+"--"+$s_LastName(parent)+"-"+$RubricAs
signmentName

The two attributes followed by "(parent)" have been selected from the autocomplete list and the parent has a value for them. But the agent is pulling the value for these two bits from the note itself and not the parent. ("0" for the empty student ID and nothing for the empty string.) The dashes, which belong to the action, and the $RubricAssignmentName, which belongs to the note itself, are filling correctly.

Can anyone see what I've done wrong? I'm stumped.
Back to top
 
 
  IP Logged
Mark Anderson
YaBB Administrator
*
Offline

User - not staff!

Posts: 5689
Southsea, UK
Re: Using $attribute(parent) in Agent Action
Reply #1 - Sep 29th, 2015, 12:09pm
 
If you're acting on an alias child of an agent, 'parent' is the parent of the alias, i.e. the agent. Most likely you want to refer to the parent of the aliases' original note. For this use the designator parent(original) rather than just parent. See more.
Back to top
 
 

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



Posts: 22

Re: Using $attribute(parent) in Agent Action
Reply #2 - Sep 29th, 2015, 5:19pm
 
That's it.

...it's also exactly the same problem I last asked about on this forum and thought I understood. Alias/original will sink in soon.

Thank you.

***UPDATE***

I spoke too soon. I'm not sure I understand how to place the parentheses. Would the action read:

$RubricExortFileName=$s_IDNumber(parent(original))+"--"+$s_LastName(parent(origi
nal))+"-"+$RubricAssignmentName

Based on the examples in and around the linked page, I guess I'm doing something more complex than I realized and don't have the syntax to keep up. ...Before I added the "(original)" to it, the action worked correctly but was reading the agent as the parent. Now it seems to be doing nothing...

So I guess my question would be: What do I write to pull the value of an attribute (e.g. $s_IDNumber) from the parent of the original note if what I have isn't it?

Back to top
 
« Last Edit: Sep 29th, 2015, 5:33pm by BCrane »  
  IP Logged
BCrane
Full Member
*
Offline



Posts: 22

Re: Using $attribute(parent) in Agent Action
Reply #3 - Sep 29th, 2015, 5:37pm
 
I had a typo in an attribute name!

So thanks Mark. Your original info fixed the problem. Much appreciated.
Back to top
 
 
  IP Logged
Mark Anderson
YaBB Administrator
*
Offline

User - not staff!

Posts: 5689
Southsea, UK
Re: Using $attribute(parent) in Agent Action
Reply #4 - Sep 29th, 2015, 5:45pm
 
Good. Glad your now fixed.
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