Manage JavaScript system columns
Calculated column procedure
Create a reusable calculated field on a system table, test it against collected data, and validate it before workflows depend on it.
Use a JavaScript system column when the same derived value should be available anywhere NIM uses that table. For deciding between a system-table column and a filter column, safe code patterns, and Vault queries, see Custom JavaScript columns.
Create a JavaScript system columnDirect link to Create a JavaScript system column
- Expand the system’s table list, open the relevant table, and select the Columns tab.
- Select Add.
- Enter a clear Column Name that describes the output, such as
normalized_department. - Enter the JavaScript calculation in the Code pane.
- Use the green-arrow control to insert a source-column variable at the cursor position when needed.
- Optionally use Insert a JavaScript Function to add supported hash functions, Vault queries, or variable queries.
- Select Test Script and check the result in Script Result Value.
- Select Save and Exit.
Work with column variablesDirect link to Work with column variables
NIM column variables use the format tableName['columnName']. For example:
return employees['employee_id'];
Use the insertion control when possible. It avoids a mismatch between the displayed column name and the value used in the script.
Validate the new columnDirect link to Validate the new column
- Collect and load the system.
- Inspect the table data to confirm the calculated values are present and formatted as expected.
- Test any filter, mapping, or name generator that will use the column before scheduling it.
Changing a system JavaScript column changes its output everywhere the table is used. Check existing filters, mappings, and jobs before modifying a shared calculation.
Edit a JavaScript system columnDirect link to Edit a JavaScript system column
- Open the relevant system table and select the Columns tab.
- Select Edit Column for the calculated column.
- Update the name or code, then use Test Script before saving.
- Save the change, recollect the system, and validate all dependent workflows.
Remove a JavaScript system columnDirect link to Remove a JavaScript system column
- Review the filters, mappings, roles, and jobs that may reference the column.
- Open the relevant system table and select the Columns tab.
- Select Remove Column, confirm Yes, and save the table.
- Recollect the system and test dependent workflows.
Before you finishDirect link to Before you finish
- Keep the original source columns available for troubleshooting.
- Use a system-table calculation only when it is reusable and based on the table’s own data.
- Keep business rules concise and document non-obvious defaults.
- Use filter JavaScript columns for calculations that are specific to one filter or use data already combined in that filter.