Difference between revisions of "Calculation field"

From Memento Database Wiki
Jump to navigation Jump to search
Line 11: Line 11:
  
 
String values/variables must be enclosed by Quote characters:
 
String values/variables must be enclosed by Quote characters:
<source lang="java" >
+
<source>
 
'Result: ' + '#{string_field1}' + '#{string_field2}'
 
'Result: ' + '#{string_field1}' + '#{string_field2}'
 
</source>
 
</source>

Revision as of 06:42, 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}'