View Article

Create Manual Constants

By Xelence Documentation posted 04-20-2022 11:35

  

Introduction

A constant defines a value that parameterizes rules. This means instead of defining a particular limit within a rule, you can specify the limit as a constant and then refer to that constant in any of your rules.

You create manual constants when you need constants you can't define as query results. This is best practice, rather than calling properties from their objects.

Prerequisites

The project must be configured in Xelence.

Quick Steps
1 Click the Tools icon and select Constants
2 Add a group
3 Enter the ID, then click OK
4 Add a constant to the group
5 Enter the ID, then click OK
6 Enter the constant details
7 Save the file

Detailed Steps

Step 1. Click the Tools icon and select Constants.




Step 2. Add a group.

By default, the Constants file starts with one group called NeoConstant. You can organize your constants in any number of nested groups under that. To add a group, click the Add Group icon.



Step 3. Enter the ID, then click OK.

Every group has to have an ID. It cannot contain spaces.



Step 4. Add a constant to the group.

Select the group you want to add the constant to and click the Add Constant icon.



Step 5. Enter the ID, then click OK.

Every constant has to have an ID. It cannot have spaces.



Step 6. Enter the constant details.

Besides the ID, which you entered when you created the constant, the two required details are:

  • Value: Specifies the value you want to set for the constant.
  • Data Type: Specifies the data type for the constant.
You can also specify effective date(s) and associated value(s). If your constant needs to change value depending on the date, add rows under the Items property and enter the date and 
value the constant should be on that date. An example of a constant with an effective date is a financial rate tied to the fiscal year: when the fiscal year changes, the rate needs to change.


Step 7. Save the file.

Continue adding any constants you need for the rule you want to design.


When you are finished adding constants, save the file so you can use constants in the rule later, as in the example below.


What are the improvements over S3 Version 6?

This is an identical process.


Related Article

Import Code Values as Constants


This post is part of the Rules topic. Click here to open the Rules Overview.

#Xelence
#Rules

0 comments
56 views