View Article

Import Code Values as Constants

By Xelence Documentation posted 10-17-2022 15:12

  

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.

If the constant values you want to define are already defined in code groups, you should execute a query for the values you want and import them as constants.

Prerequisites

The code values must already exist.

Quick Steps
1 Click the Tools icon and select Constants
2 Add a group
3 Enter the ID, then click OK
4 Select the Group Type, then enter the Query
5 Click the Get Schema icon, then enter the constant details
6 Click Import, then click Ok
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. Select the Group Type, then enter the Query.

You are adding constants by executing a query, so select Query.

This example retrieves values from the application code groups.



Step 5. Click the Get Schema icon, then enter the constant details.

When you have entered the Query, click the Get Schema icon to retrieve the table's column IDs so you can map them to the constant details.

To import constants via query, you need the following details:

  • Name Column: This is the table column whose value you want to use to refer to the constant.
  • Value Column: This is the table column whose value you want to use as the constant value.
  • Description Column: This is the table column whose value you want to use as the constant description.
  • Group Name Column: This is the table column whose matching values you want to use as group names if you are creating multiple groups of constants with one query.



Step 6. Click Import, then click Ok.

When you have entered the details, click Import to create the new constants. This will also create new groups if you have entered a Group Name Column.
This example creates two groups: Communication Preference and Designation Code.
Xelence will validate the imported constants and display any validation messages. Click Ok.
Each individual constant has all the same properties as any manual constant. This is just a way to create a bunch of them at once. An individual constant looks like this:



Step 7. Save the file.

Save the file so you can use the constants in rules.


What are the improvements over S3 Version 6?

This is an identical process.


Related Article

Create Manual Constants


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


#Rules

0 comments
54 views