Write, Bureaucrats, Administrators
4,332
edits
mNo edit summary |
mNo edit summary |
||
Line 1: | Line 1: | ||
{{Stamp|2016-09-10|3.9.7|1.0.3}} | {{Stamp|2016-09-10|3.9.7|1.0.3}} | ||
The values in Calculation fields are calculated from the expressions specified by you in Memento Script, defined herein. | The values in Calculation fields are calculated from the expressions specified by you in Memento Script, defined herein. | ||
Line 8: | Line 9: | ||
Numeric and string types can not be mixed in a left / right operand pair. | Numeric and string types can not be mixed in a left / right operand pair. | ||
== Result type == | |||
For each calculation, there must be a correct result type set: | |||
; ''Real result'' and ''Integer result'' | |||
: are used for expressions with a numerical result. | |||
; ''Date/Time result'' | |||
: is used to represent the result in the form of date and time. The calculation result is interpreted as the number of seconds that has passed since January 1, 1970 (UNIX time). | |||
; ''Date result'' | |||
: is the same as the previous type, but displays only the date. | |||
; ''String result'' | |||
: is used for expressions that contain string manipulations or functions that return a string. | |||
== Variables == | == Variables == | ||
Other fields in the same entry and fields in linked libraries may be referenced as read-only variables. | Other fields in the same entry and fields in linked libraries may be referenced as read-only variables. | ||
Line 44: | Line 58: | ||
* ! boolean not | * ! boolean not | ||
== | == Functions == | ||
Functions are available to assist in crafting expressions to calculate a result. Function calls may be tipped into the expression, or the user may use the '''+Function''' button to display acc tabbed list of functions that may be used. | |||
=== Math functions === | |||
'''[[TBD]]''' | |||
=== Date/Time Functions === | |||
'''[[TBD]]''' | |||
=== String functions === | |||
'''[[TBD]]''' | |||
; | === Logical functions === | ||
: | ; if(,,): returns one value of a logical expression if TRUE (not equal to 0.0) and another if it is FALSE (equal to 0.0) | ||
; | ; switch(,,,): accepts an expression, result/Value pairs, and a default value, and determines the final result based on selecting among the paired results to identify the paired value (or else the default) to be used.<br/> Clear? Probably not, so... | ||
'''[[TBD]]''' | |||
== Link to Entry == | == Link to Entry == | ||
Use the following syntax to get access to the values of Link to Entry and other linking fields: | Use the following syntax to get access to the values of Link to Entry and other linking fields: | ||