Call a ui macro from a service catalog variable
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-27-2016 10:50 PM
I have a variable of type reference which is referring to sys_user table.
When we enter a name in this variable, I want a ui macro to be invoked which will take the value of this field.
I already have code for the ui macro but I just don't know how to call a macro from this variable ?
I tried the following but it didn't help:
Popup_chat is the name of the ui macro I wanna invoke.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-27-2016 11:23 PM
Hi Dhiraj,
Create a variable of type UI Macro and refer your UI Macro in there . Hide This variable onLoad. Now create onchange client script on another field and set display true for UI MAcro.
Another way around is ... . You may be interested in displaying your macro in a popup window. invoke GlideDialogWindow from onChange client script.
GlideDialogWindow API Reference - ServiceNow Wiki
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-28-2016 12:38 AM
i Got it solved.
I referred following link
http://www.servicenowguru.com/system-ui/ui-macros/add-macro-non-reference-field/
Thanks Anyways