Read dropdown labels and values
Resolve and list dropdown (choice) field labels and values for any ServiceNow table or form screen.
ServiceNow stores dropdown fields as internal values
(for example 4) while displaying user-friendly labels
(such as 4 - Low) in the UI. These mappings are defined
in the sys_choice system table.
Use this example to discover and resolve dropdown options for fields like Priority, State, Category, Close Code, and any custom choice field across all ServiceNow tables.
-- Resolve and list dropdown (choice) labels and values for any table and field
-- Replace <TABLE_NAME> and <FIELD_NAME> with your target form field (e.g. name=incident^element=priority)
SELECT *
FROM get_table_rows
WITH(
TableName='sys_choice',
Query='name=<TABLE_NAME>^element=<FIELD_NAME>'
)