How to show UI Macro on Change
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-17-2025 07:42 AM - edited ‎06-17-2025 07:48 AM
Hello Everyone,
I have a question regarding the use of a UI Macro in a Catalog Item form. I have a field called "Category" (a Select Box) with options like External, Internal, Existing, Subcontract, etc. Based on the selected value, I want to display some additional information just below this field on both Task and RITM levels.
To achieve this, I created a custom variable "Category Info", embedded the UI Macro inside it, and attached it to the form. The macro is working as expected and displays the relevant message after the form is submitted or refreshed (e.g., when closing a Task or RITM).
However, I'd like this behavior to happen dynamically—when the Category field value changes—without needing to save or reload the form. I'm not sure how to enable that on an OnChange basis category field options..
Code which I written -
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-18-2025 12:39 AM
Hello @Atik,
Please refer to the link below:
https://www.servicenow.com/community/developer-forum/if-condition-in-jelly-script/m-p/2112663#M76958...
If this is helpful, please hit the thumbs up button and accept the correct solution by referring to this solution in future it will be helpful to them.
Thanks & Regards,
Abbas Shaik