Free cookie consent management tool by TermsFeed

a!customFieldSum_26r9 Function

On This Page

This page contains information related to an old version of the a!customFieldSum() Function.

To take advantage of the latest features and improvements, we always recommend you use the latest version whenever possible. See the latest version's page for information about what's been changed.

Function

a!customFieldSum_26r9( value )

Used to create a real-time custom record field, this function returns a sum of values. You can calculate the sum of record fields, related record fields, or literal values of type Number (Integer) or Number (Decimal Floating).

Parameters

Keyword Type Description

value

Any Type

An array containing any combination of record fields, related record fields, or literal values to be summed. You must have at least two values in the array.

Usage considerations

Where to use this function

The a!customFieldSum_26r9() function can only be used to create a custom record field that evaluates in real time. This means you can reference related record fields, constants, and other supported functions in your calculations.

To create a custom record field that evaluates in real-time:

  1. In your record type, go to Data Model.
  2. Click NEW CUSTOM RECORD FIELD.
  3. From SELECT A TEMPLATE, choose Write Your Own Expression.
  4. Choose Real-time evaluation.
  5. Click NEXT.
  6. Enter an expression using any Custom Field function.

    Note:  Custom record fields that evaluate in real-time must use at least one Custom Field function.

  7. Click NEXT.
  8. Enter a Name for your custom record field.
  9. Click CREATE.
  10. Click SAVE. The new custom record field appears in your list of fields.

Use with other Custom Field functions

You can use the a!customFieldSum_26r9() function in conjunction with other Custom Field functions, like a!customFieldSubtract(), a!customFieldDivide(), or a!customFieldMultiply() to create the calculations you need.

See the Real-time evaluation recipes for an example.

Example

Let's say you want calculate each employee's total salary, which includes their base salary, restricted stock units (RSU), and an annual bonus that is only applied if they qualify.

On the Employee record type, you could create a custom record field that evaluates in real-time so you can add the baseSalary field, the related record field rsuDollarAmount, and the related record field annualBonus. However, the annualBonus field will only be included in the calculation when the constant cons!DISCRETIONARY_BONUS is true.

1
2
3
4
5
6
7
8
9
10
11
a!customFieldSum_26r9(
  value: {
     recordType!Employee.fields.baseSalary,
     recordType!Employee.relationships.employeeLevel.fields.rsuDollarAmount,
     /* If the constant is true, then add a discretionary bonus */
     if(cons!DISCRETIONARY_BONUS, 
        recordType!Employee.relationships.employeeLevel.fields.annualBonus,
        0
     )
   }
)

Feature compatibility

The table below lists this function's compatibility with various features in Appian.
Feature Compatibility Note
Portals Partially compatible

Can be used with Appian Portals if it is connected using an integration and web API.

Offline Interfaces Incompatible
Sync-Time Custom Record Fields Incompatible
Real-Time Custom Record Fields Compatible

Can only be used to create a custom record field that evaluates in real time. It cannot be used anywhere else in your application.

Process Reports Incompatible

Cannot be used to configure a process report.

Process Events Partially compatible

If autoscale is enabled, can be used to configure a supported process event node (such as a start event or timer event).

Process Autoscaling Incompatible

Cannot be used in autoscaled processes.

Event Consumer Filter Conditions Compatible

Can be used in filter conditions.

Event Consumer Event Handlers Compatible

Can be used in event handler expressions.

Feedback