Calculation field: Difference between revisions

Jump to navigation Jump to search
m
no edit summary
mNo edit summary
mNo edit summary
Line 441: Line 441:
=== Calling functions ===
=== Calling functions ===


The essential remaining difference is the functions that are available, the way general functions are called, and the way functions specific to the field's type (referred to as the type's methods) are called.
The essential remaining difference is the functions that are available, the way general functions are called, and the way functions specific to the field's type (referred to as the type's <i>methods</i>) are called.


In JavaScript, there are two kinds of functions. The first is just like Calculation field functions, except that JavaScript has its own generally different functions to do the same things. For example, to return the maximum of two fields in a Calculation field would be <code>max(#{field1},#{field2}</code>, while in JavaScript, you would have <code>Math.max(field("field1"), field("field2"))</code>.
In JavaScript, there are two kinds of functions. The first is just like Calculation field functions, except that JavaScript has its own generally different functions to do the same things. For example, to return the maximum of two fields in a Calculation field would be <code>max(#{field1},#{field2}</code>, while in JavaScript, you would have <code>Math.max(field("field1"), field("field2"))</code>.

Navigation menu