Use the Set Field command to add the values of numeric fields together and then populate an app field with the calculated value.
1.With an app loaded in the App Designer in Layout view, select the field or button object 2.On the Properties panel, choose the event that should trigger the Set Field behavior to run. PerfectApps switches to the Behavior view.
3.From the Objects Commands section of the Toolbox, drag and drop the Set Field command onto the behavior canvas. 4.On the Properties panel under the Field section, click Select. Choose the field where the result of the calculation should be written. 5.In the Value section of the Properties panel, select the data that should populate the field.
6.To populate the field with a calculated value, choose Formula and click Compose. PerfectApps displays the Formula Editor.
7.Select the <empty> line and then select Value of a Field on the right. 8.Click Select and locate the first field to act as part of the calculation. 9.Click Add Line. 10. Click on the added <empty> line and then select Value of a Field on the right. 11. To change the operator from the default plus (+) sign, click the + and choose a different operator from the list. 12. Click OK. You have now built a formula that evaluates the values of two fields and places the resulting calculation in an app field. |
See also: Conditional Behavior
Return to Adding Behaviors, Designing an App