ProcessMaker API Documentation
Script Central

What is a Calculated Property?

Understand how to use Calculated Properties in your ProcessMaker Screens.

Overview

Use Calculated Properties mode to add or edit Calculated Properties to a ProcessMaker Screen that perform calculations and formulas based on data entered into that Screen. A Calculated Property represents any value, mathematical calculation, or formula that calculates a value. A Calculated Property determines its value either through a mathematical formula or valid JavaScript, and may include ProcessMaker Screen control and/or Magic Variable values during a Request. Likewise, a Calculated Property's value can display in a ProcessMaker Screen control. Calculated Properties can only be used within and only affect the ProcessMaker Screen to which the Calculated Property is added.

Below are a few uses for Calculated Properties that can be calculated mathematically or through JavaScript:

  • Perform simple mathematics. Example: 1+1

  • Calculate the final cost of a purchase based on a sales tax. Example: $60 (item cost) x .075 (sales tax)

  • Calculate the minimum credit card payment. Example: $1000 (amount owed) x .03 (interest rate)

Reference the ProcessMaker Screen control values for a Property using their Variable Name setting values. For example, to determine the cost for a number of items in a ProcessMaker Screen for a purchase request form that uses a Line Input control with a Variable Name setting of units to indicate how many items to purchase, and price is the amount per unit, use the following calculation in a Property:

units * price

Calculated Properties display as the second key-value pair of the ProcessMaker Screen's JSON data model from the Data Preview panel when previewing that Screen.

Related Topics