auto_stories Knowledge Base chevron_right Actions chevron_right Article

Calculate Form Fields

This operation performs Total-Subtraction-Division-Multiplication with the fields in the form.

 mceclip0.png 

Mathematical Operations operation at Property Panel

 

Properties

Description: Description related to action is written

Heading: When added as Form Action, it specifies the name in the action list.

Linked Field: The field to write the result.

Calculate: The calculation is made in this area. (e.g. “ $PValue1$ - $PValue2$ “) ( The +, -, / and * operators can be used.)

Run Condition: If the value in the query entered in this field is “0”, the corresponding action will not run.

Request Confirmation: Select if the request confirmation will be used before running the action. If Request Confirmation is activated, the Confirmation Message feature is turned on and the message that will be displayed when requesting confirmation is written.

 

Example Used

For example; a few numeric boxes are in a form.  Subtraction is desired with these values in the controls.

mceclip1.png

A button is added in the form and a Mathematical Operations with When clicked event is created for the button. Linked Field contains the control, that the result is written automatically with the operation. The calculation is made in the Calculate area as below.

mceclip2.png

When the values are entered in the controls and then the button is clicked, the result comes in the control named Subtraction.

mceclip3.png

Note:

In cases where the + operator is used, it will detect the values ​​you have written in quotation marks as text and will write them side by side. You can delete the quotes of the incoming values ​​so that the addition (+) operation can be performed.

Example Uses:

ornek1.png

Values ​​are written in quotation marks.

ornek2.PNG

Client screen shot

Updated the Result field by concatenating the Value 1 and Value 2 fields as strings because the quotation marks were not removed.

ornek3.png

Removed quotation marks from values ​​for the same example.

mceclip1.png

Screenshot of client after removing quotes