Calculation field: Difference between revisions

From Memento Database Wiki
Jump to navigation Jump to search
(Created page with "The values in the calculation fields are calculated from the expressions specified by you.<br /> The following types of expressions are supported: * Mathematical - Expression...")
 
No edit summary
Line 11: Line 11:


String values/variables must be enclosed by Quote characters:
String values/variables must be enclosed by Quote characters:
<source>
<syntaxhighlight lang="python" >
'Result: ' + '#{string_field1}' + '#{string_field2}'
'Result: ' + '#{string_field1}' + '#{string_field2}'
</source>
</syntaxhighlight >

Revision as of 06:39, 22 July 2016

The values in the calculation fields are calculated from the expressions specified by you.
The following types of expressions are supported:

  • Mathematical - Expression involving numbers.
  • String - String can also be added together, compared, etc...
  • Boolean - Expression that evaluate to true (1.0) and false (0.0).
  • Numeric and string types can not be mixed in a left / right operand pair.

Variables

Variables are values of other fields in the same record.
Variable must be enclosed by a pound sign and open brace #{ and a closed brace }. i.e. expression = "#{field_name1} + #{field_name2}"

String values/variables must be enclosed by Quote characters:

'Result: ' + '#{string_field1}' + '#{string_field2}'