Constants

Introduction

Validation often needs cross-checking both from the client and server side. Both depend on the same constants. These constants may change from time to time and they are easy to forget to update these constants deep in the ETL chains or scripts, and to keep them synchronised.

The Constants page allows you to define these constants that can be used in the ETL steps or scripts. This page can be selected via the left panel.

These constants can be accessed using the Lookup Constant ETL step under the Ambience category.

Add

To add a constant, click on the “Add” button at the upper right corner of the page.

The “Add Constant” dialog box will appear.

Field Description Input Type Default Value
Name Unique name of the constant. Textbox None
Value Value of the constant in JSON format. Textbox None

Key in an unique name for the constant in the “Name” field.

In the “Value” field below, key in the value of the constant in JSON format. You can expand the textbox to a full screen by clicking on the “Expand” icon above the textbox, on the right corner.

Once the constant is entered, click on the “Save” button to save the constant. To abort, click on the “Cancel” button.

If the name provided in the “Name” field already exists or no name is provided, the appropriate error message will appear.

Once saved successfully, the constant will appear in the management page.

By default the list of constants are sorted in ascending order using the “Name” field. You can sort the list in descending order by clicking on the column title.

Delete

To delete a constant, click on the “Delete” icon under the “Actions” column of the corresponding constant.

A notification will appear.

There is an “Undo” button to undo the deletion. Upon clicking on the “Undo” button, the deleted constant is restored and is added back to the list of constants. Do note that the notification will disappear after some time.

Edit

To edit a constant, click on the “Edit” icon under the “Actions” column corresponding to the desired constant.

The “Edit Constant” dialog box will appear.

Edit as desired and click on the “Save” button to save the changes. To abort the change, click on the “Cancel” button.

Upload

To upload a constant, click on the “Upload” button at the upper right corner of the page.

The “Upload” dialog box will appear.

Click on the “Choose File” button in the dialog box and browse to the location of the JSON file to be uploaded. Click on the “OK” button to upload the file. To abort, click on the “Cancel” button.

If the filename already exist or no file is selected, an error message will appear.

To overwrite the existing constant, select the “Overwrite” field, then click on the “OK” button. The constant in the uploaded file will overwrite the existing constant with the same name.

Once the file is uploaded successfully, a message will appear.

Download

You can download a constant by clicking on the “Download” icon under the “Actions” column corresponding desired constant.

The downloaded file will have the filename <ConstantName>.constant.json.

Refresh

After performing actions on the browser, the list is reloaded to display the list of constants. The manual “Refresh” button is available and is particularly useful if there are others making changes on the same page.

The “Refresh” button is found on the upper right corner of the page. Clicking on it reloads the list of constants.

Search

There is a cross-field search function for the list of constants. It is located at the upper left corner of the page.

This provides an easy way to search through the list of constants. It is case-insensitive and displays constants that have the entered search value in any of the values of the fields below:

  • Name
  • Value
  • Last Modified
  • Last Modified By

Alternatively, you can click on the any item under the “Last Modified By” column to aid the search for the constants in the page.

In the example above, constants that are last modified by “admin” are shown.

These two search methods can be combined together, with each criteria separated by a comma.