UI Action button transferring
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-28-2024 06:11 AM
Hey, So I want to create an UI Action (a button) called "Transfer to Help2" on an incident form. This is in ServiceNow.
On an incident form we have a field called incident_type, so it can either be Help1 or Help2 as an incident type. And both of the form views has different fields on the form depending on if the incident_type is Help1 or Help2, but there is one specific field which Help1 does not have which is on Help2. So before the incident gets transfered over from Help1 to Help2 I want to be able to fill out that field which is a reference field called: u_system. This field must be filled before the incident can be transfered to Help2. I want this field to be filled out by the operator which is handling the incdient, and after its been filled out it can then be transfered over to Help2 so that the incident type is changed over to Help2.
How can I script this into my UI action button?
Any help is appreciated.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-05-2024 04:19 AM
Hi, there are a few things to consider here. On the strictly functional level that'd address the case you're describing, you could use the following UI action
- A Data Policy that would ensure that u_system is truly mandatory (the "mandatory" flag on the sys_dictionary level is strictly client-side).
- Perhaps a condition in the UI action itself, to only show the button if the required field is not empty.
Please mark this response as useful and the question as solved if the issue has been solved. Thank you!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-05-2024 05:05 AM
Hello @AbooK,
Here's a suggestion that might be helpful:
In the script section of your UI action, you can display your form view containing the 'u_system' field using a script similar to this, adjusting per your requirement.
The UI action includes a 'UI Action Visibility' related list. You can navigate here to exclude any views that you do not want to display when you click your UI action.
After clicking on the UI action, the script will open a dialog form displaying the specified form view containing the 'u_system' field.
If this information was helpful, please mark this answer as Accepted as Solution and hit the helpful button. Thank you!