About Formula
Formula for calculated field can be entered within field configuration. Same as Excel, the formula start from equal character (=). As Excel's A1, B2, other fields can be referenced with field name.
Functions can be also used same as Excel. For example, [IF] for determin by field value, [Date] to transform to string to Date or [Substitute] to crop the part of text string.
[SUM] function, which is most frequently used in Excel, can be used for calculated field as well. But it can only refer to values in same item ("row" in excel) and can not refer to other items ("column" in excel), so it might not be useful as excel.
MoriApps Simple Workflow also uses calculation field for conditional approval tasks to determin whther the approval task is required or not. It uses the calculation field to result in Yes/No value (Boolean). We here explain three example.
Example One
Thare are [Category] field and if [Category] is [Computer] or [Keyboard], the field [Requre IT approval] become [Yes].
- Create [Category] field with Choice type, and add choices like [Computer], [Keyboard], [Desk] and [Chair].
- Create [Require IT approval] field as calculated field and enter the formula as below.
=OR(Category="Computer",Category="Keyboard")

Example Two
Thare are [Price] field and if [Price] is more than 50000, the field [Requre IT approval] become [Yes].
- Create [Price] field with Number or Currency.
- Create [Require IT approval] field as calculated field and enter the formula as below.
=Price > 50000
Example Three
Thare are [Category] field and [Price] field and if [Category] is [Computer] or [Keyboard] and [Price] is more than 50000, the field [Require IT approval] become [Yes].
- Create [Category] field with Choice type, and add choices like [Computer], [Keyboard], [Desk] and [Chair].
- Create [Price] field with Number or Currency.
- Create [Require IT approval] field as calculated field and enter the formula as below.
=AND(OR(Category="Computer",Category="Keyboard"),Price > 50000)


No comments:
Post a Comment