- My View
Before starting I would like to emphasize that I am new to servicenow, however I am very enthusiastic about learning this powerful tool.
The first challenge that I have is about to know how to pass a value from an UI macro to a variable.
I have defined the below two fields in the service catalog.
The "Request Type:" field has defined around 8 values, I had to use a macro because the length of the values.
I would like to know how can I pass the value from the "Request Type:" macro field to the "Request Type from UI Macro" variable using an OnChange script
In addition to this, once I am able to pass the value from the macro to the variable, I want to display certain fields.
if "Request Type from UI Macro" = "SIR Member Accessibility (choose for visual, hearing, motor accessibility issues)"
The below field should be visible
Thanks in advance for your support, any help would be appreciated
an onChange script can only reference a variable created through servicenow. I suggest creating a servicenow variable and doing it that way. not sure your reason for creating a custom ui macro for this. however, if this is not an option. you can create a onLoad Client script and add event listeners to watch your custom ui macro and set your value that way. I do not think this would be supported however in service portal.
- Please like or mark as correct/helpful as you see fit.
If you have any other questions please let me know.