Set Value from Label
- Altorra Solutions

- Jun 30
- 2 min read
Streamline your ServiceNow variable setup with the "Set Value from Label" UI Action—a productivity gem in the Developer Toolbox series! Alongside tools like "Set Name from Question", "Set Name from Source Table", and "Set Value from Text", this UI Action automatically sets the Value field to a lowercase version of the Label field, prefixes it with the Dependent value (if applicable), and replaces special characters with underscores. Perfect for developers who need consistent, script-friendly values, this tool eliminates manual entry errors and saves time when creating choice lists or variables. Simplify your scripting prep and focus on what matters—try it today!
User Guide
Overview
The "Set Value from Label" UI Action in ServiceNow is a productivity tool that automatically populates the Value field with a modified version of the Label field. It converts the Label to lowercase, prefixes it with the Dependent value (if set), and replaces special characters (anything other than a-z, 0-9) with underscores. This ensures the Value field is script-friendly and consistent, making it easier to use in scripts for comparisons.
Steps to Use
1. Navigate to a Choice or Variable Form
Log in to your ServiceNow instance.
Open a form where you’re creating or editing a choice or variable, such as:
A choice list on a field.
A variable in a catalog item.
2. Fill in the Label and Dependent Value (Optional)
In the form, enter the desired text in the Label field.
If applicable, set a Dependent value (e.g., "response") to prefix the Value field.
3. Use the Set Value from Label UI Action
Scroll to the Related Links section at the bottom of the form (or locate the UI Action button, depending on configuration).
Click Set Value from Label (ASI).
The Value field will automatically update to a lowercase version of the Label field, prefixed with the Dependent value (if set), and with special characters replaced by underscores.

4. Review and Save
Verify that the Value field now reflects the transformed version of the Label field.
Make any additional adjustments to the choice or variable as needed.
Click Submit to save the record.
Notes
The UI Action converts the Label to lowercase, prefixes it with the Dependent value (if specified), and replaces special characters (e.g., spaces, slashes, or symbols) with underscores.
Only characters a-z and 0-9 are retained; all others are replaced with underscores to ensure script-friendly values.
This tool is ideal for preparing values used in scripts, as lowercase and underscore-separated strings are easier to compare.
The UI Action only modifies the Value field; other fields remain unchanged.
If you still have any questions, comments, or need any support, please reach out to us, by visiting https://www.altorra.com/support
Be sure to also explore the other powerful tools in the PowerClick Toolkit, along with our other exceptional products, designed to streamline your daily tasks, boost efficiency, and save you valuable time.



Comments