Scripting: Difference between revisions

Jump to navigation Jump to search
m
no edit summary
mNo edit summary
mNo edit summary
Line 17: Line 17:
* x = y means for Memento to assign to x the value of y.
* x = y means for Memento to assign to x the value of y.
* For numbers, x + y means the ''sum'' of x and y, while if x & y are strings of text, it means x ''concatenated'' with y.
* For numbers, x + y means the ''sum'' of x and y, while if x & y are strings of text, it means x ''concatenated'' with y.
:; Item price // ''on an invoice'':field("Unit price") * field("Quantity")
:; Item price    // ''on an invoice'':field("Unit price") * field("Quantity")
:; Amount for display // ''Final sum'': field("Total") + " widgets"
:; Amount for display    // ''Final sum'': field("Total") + " widgets"
:; Limited // ''The capped amount'': value = field("Value"); if (value <= StandardLimit) value else StandardLimit
:; Limited&nbsp;&nbsp;&nbsp;&nbsp;// ''The capped amount'': value = field("Value"); if (value <= StandardLimit) value else StandardLimit


=== JavaScript scripting for [[Triggers|'''Memento Triggers''']] ===
=== JavaScript scripting for [[Triggers|'''Memento Triggers''']] ===

Navigation menu