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 >> User action: Calculation
http://www.eastgate.com/Tinderbox/forum//YaBB.cgi?num=1409223559

Message started by luix on Aug 28th, 2014, 6:59am

Title: User action: Calculation
Post by luix on Aug 28th, 2014, 6:59am

I'm trying to set up a prototype which automaticly multiplicates two values, but have no clue how to manage that.
Who will explain it for me? Thank you.


Title: Re: User action: Calculation
Post by Mark Anderson on Aug 28th, 2014, 7:17am

Use the prototype's rule ($Rule) which you can access via the Action Inspector (see here).

So you want $Total to be the result of $Amount_1 multiplied by $Amount_2? Then the code for the rule is:

$Total = $Amount_1 * $Amount_2;

If either source amount changes you may need to wait a little while before $Total updates in the key attributes table - or de-/re-select the note to refresh the table.

More on the multiply operator.

Rules act on themselves - i.e. the current note. Another approach would be to use the same code but in a stamp. To use the stamp, select the notes to be affected , select the stamp and click the apply button. The code is run once [sic] on all currently selected notes.

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.