Calculated Property Best Practices
Follow best practice guidelines and considerations when using Calculated Properties.
Calculated Property Best Practice Guidelines
Follow these best practices and considerations when using Calculated Properties in Screens:
Calculated Properties are not designed to modify the current Screen control value(s). Calculated Properties read the value(s) from a specified Screen control via its Variable Name setting to calculate a result.
When designing a Calculated Properties, do not use the value from a Screen control which, in turn, calculates that property. Such design is circularly referencing the control from which to calculate its value.
Calculated Properties are not designed for a user to modify a Calculated Property via a Screen control.
When referencing a Calculated Property in a Screen, use its name in the exact case as defined since a Calculated Property's name is case sensitive. For example,
netCost
andNetCost
are two distinct names for Calculated Properties.Calculated Properties are not designed to introduce additional JavaScript functionality: doing so can cause instability in that Screen. ProcessMaker Platform does not support Screens that have additional JavaScript functionality within them.
Do not use third-party libraries within Calculated Properties such as jQuery or moment.js, as these libraries may be updated in and/or removed in ProcessMaker Platform. ProcessMaker Platform does not support Screens that use third-party libraries within them.
Do not reference one Calculated Property within another, such as referencing
this.myCalcProp
in a Calculated Property namedmyCalcProp
: doing so causes a circular reference which degrades the performance of the Screen or may cause the Screen to stop functioning entirely.If using a Calculated Property in a nested Screen that requires the value from its hosting Screen, then do not use the same Request variable in the nested Screen’s Calculated Property as that used in the hosting Screen.
Calculated Properties are generated values that cannot be edited after calculation.
Related Topics
What is a Calculated Property?View Calculated Properties for a ScreenAdd a Calculated Property for a ScreenEdit a Calculated Property for a ScreenDelete a Calculated Property from a ScreenWhat is Screen Builder?Screen Builder ModesPreview a Screen for Desktop and Mobile DevicesControl DescriptionsView ScreensScreen TypesValidate Your ScreenAdd, Delete or Rename a PageAdd Custom CSS to a ScreenManage WatchersPublish Your ScreenScreen Design Best PracticesLast updated