View this page in the latest version of Appian. a!customFieldSubtract_26r9 Function Share Share via LinkedIn Reddit Email Copy Link Print On This Page This page contains information related to an old version of the a!customFieldSubtract() 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!customFieldSubtract_26r9( value1, value2 ) Used to create a real-time custom record field, this function returns the difference between two numbers. You can subtract record fields, related record fields, or literal values of type Number (Integer) or Number (Decimal Floating). Parameters Keyword Type Description value1 Any Type The record field, related record field, or literal value from which value2 is subtracted. Valid data types include Number (Integer) or Number (Decimal Floating). value2 Any Type The record field, related record field, or literal value to subtract. Valid data types include Number (Integer) or Number (Decimal Floating). Usage considerations Where to use this function The a!customFieldSubtract_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: In your record type, go to Data Model. Click NEW CUSTOM RECORD FIELD. From SELECT A TEMPLATE, choose Write Your Own Expression. Choose Real-time evaluation. Click NEXT. 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. Click NEXT. Enter a Name for your custom record field. Click CREATE. Click SAVE. The new custom record field appears in your list of fields. Use with other Custom Field functions You can use the a!customFieldSubtract_26r9() function in conjunction with other Custom Field functions, like a!customFieldSum(), 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 net salary. The Employee record type has a grossSalary field, which contains each employee's salary amount. The Benefits record type has a deductions field, which determines the deduction amount based on the selected benefits plan. To calculate each employee's net salary, you could create a custom record field on the Employee record type that evaluates in real-time so you can reference the related record field from the Benefits record type in your calculation. The expression would look something like this: 1 2 3 4 a!customFieldSubtract_26r9( value1: recordType!Employee.fields.grossSalary, value2: recordType!Employee.relationships.benefits.fields.deductions ) 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 Was this page helpful? SHARE FEEDBACK Loading...