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
why does this action not work? (Read 768 times)
Ted C.
Full Member
*
Offline



Posts: 5

why does this action not work?
Jan 14th, 2016, 6:45pm
 
Here's the action: $LastContact=($Contact_date(child))

I've put it in the container's inspector, in the agent window. I want it to get the date from $Contact_date in the first child. The children are sorted by date to make the most recent one the first child.

I see no result at all. I've read TBX help and the Agents and Dashboards doc. I'm missing something, but I can't tell what.
Back to top
 
 
  IP Logged
Mark Anderson
YaBB Administrator
*
Offline

User - not staff!

Posts: 5689
Southsea, UK
Re: why does this action not work?
Reply #1 - Jan 15th, 2016, 4:22am
 
I'm not totally clear as the Inspector has no 'agent' window/tab. Get Info does have and agent tab but that applies to agents.  I believe you want to get a container (note) rule to set a Date-type user attribute $LastContact to be the value of the Date-type user attribute $Contect_date of the filed child within the container.  If your scenario is different, e.g. the attribute data types differ, please clarify.

Anyway, using the above scenario, both these work as the container's $Rule:

$LastContact=($Contact_date(child));
$LastContact=$Contact_date(child);


The latter makes more sense as there is no explicit need for the extra parentheses on the right side but as you can see they do no harm.

Even if I make $LastContact a String-type attribute, I still get the expected date. I suspect some other code is at work, assuming the first child actually has a valid date in $Contact_date.

Can you post a URL link (e.g. a Dropbox link) to a TBX showing the example? It doesn't need to be all oyur private data. Just make a new TBX with a container and two children (two so as to test container sort order) and the necessary user attributes. That way we can use a known test model.
Back to top
 
 

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



Posts: 5

Re: why does this action not work?
Reply #2 - Jan 18th, 2016, 1:27pm
 
Thanks, Mark. To clarify: When I referred to the "agent" tab, I indeed meant the "action" tab.

In any case, it works now. In preparing a simple TBX file for Dropbox, I did what you suggested, putting the expression in the container's $Rule. I also found an error of mine.

Thanks!
Back to top
 
 
  IP Logged
Pages: 1
Send Topic Print