How to display popup dialog modal on change of value in drop down field ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-24-2020 03:12 AM
Hi All,
I wanna display a popup modal with reference field ,on change of value in choice field. When I select 'A' or 'C' option from choice drop down. I wanna display a popup dialog modal with reference field to location table.
Thanks in advance
- Labels:
-
Enterprise Asset Management
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-24-2020 03:21 AM
Hi,
You can create onchange client script for choice field <X> and use below script to open popup.
var dialog = new GlideDialogWindow(<ui_page>); //Render the dialog containing the UI Page 'terms_and_conditions_dialog'
dialog.setTitle(<title>); //Set the dialog title
dialog.setSize(600,600); //Set the dialog size
dialog.removeCloseDecoration(); //Remove the dialog close icon
dialog.setPreference(<option_name>,<option_value>); //Set optional parameters which can be accessed in UI page
dialog.render();
Create UI page and add reference field location to it and add logic(if any) in UI page client script.
Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-24-2020 03:25 AM
Hi Ujala,
Can you explain from the process point of view what purpose it holds of showing the reference field on selection of that choice values?
You can definitely achieve it by calling GlideDialogWindow and the UI page which you will create.
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-24-2020 06:20 AM
Hi Ankur,
Whenever CI install status field changes to Pending Disposal or In Stock the pop -up needs to show ,to which stockroom it has to add into.
If the stockroom selected in the above step is different from last known stockroom location on Asset.Asset stockroom should be changed to that selected.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-24-2020 07:58 AM
So once they change the status you want to show UI page with the option to allow user to select the stockroom from stockroom table.
Once they select the stockroom from UI page the new stockroom would be updated on the form?
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader