The Calculated Fields specification is an important tool in designing applications, allowing you to create new fields to work with in subsequent calculations, filters, and external objects. Through calculations, you can create numeric and character expressions, call database functions, and perform conditional logic.
Field Name: When creating new fields in summaries, you need to specify a field name. This name will be the name of the field in new summary table on the database.
Calc Type: Select your calculation type from the dropdown: database, system value, parameter, application, or external object. Database calculations are the most common calculation type, and will meet the needs of most new m-Power developers. View the documentation on calc types for more information.
Description: Enter a description of the field that will appear in your application.
Data Type: Select either numeric, alpha, or date.
Decimals: Specify the length of decimals in your numeric calculation.
Format: Select the desired numeric format. m-Power comes equipped with commonly used numeric and date formats. However, you can also design your own formats.
Calc Expression: Input your calculation in the largest input box. The fields and functions available to use will depend on the calculation type.
m-Power is equipped to add conditions to calculations. Data that matches the requirements of the condition will process the calculation. To add a condition, click “Add condition”. This opens the Conditions box.
Select the desired field and relationship from the respective drop down lists, and enter a value. Finally, select either “And” or “Or” from the final dropdown. Selecting “And” will require the subsequent condition to also meet the required relationship for the calculation. Selecting “Or” will allow the calculation to process if either of the conditions are met.
For more information on calculations, please click here.