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 and NetCost 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 named myCalcProp: 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.

pageWhat is a Calculated Property?pageView Calculated Properties for a ScreenpageAdd a Calculated Property for a ScreenpageEdit a Calculated Property for a ScreenpageDelete a Calculated Property from a ScreenpageWhat is Screen Builder?pageScreen Builder ModespagePreview a Screen and Its JSON Data ModelpageEdit Your ScreenpageView ScreenspageScreen TypespageValidate Your ScreenpageAdd, Delete or Rename a PagepageAdd Custom CSS to a ScreenpageManage WatcherspageSave Your ScreenpageScreen Design Best and Worst Practices

Last updated

© Copyright 2000-2024 ProcessMaker Inc. All rights reserved.