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
User action: Calculation (Read 1427 times)
luix
Full Member
*
Offline



Posts: 9

User action: Calculation
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.

Back to top
 
« Last Edit: Aug 28th, 2014, 7:05am by luix »  
  IP Logged
Mark Anderson
YaBB Administrator
*
Offline

User - not staff!

Posts: 5689
Southsea, UK
Re: User action: Calculation
Reply #1 - 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.
Back to top
 
« Last Edit: Aug 28th, 2014, 7:20am by Mark Anderson »  

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