Show a field only when the Flow designer action runs
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-24-2023 02:29 AM
Hi All,
I have a URL Type field on the Change Form. (Field Name: Alert URL)
Requirement is to show this field on the change form only when the change is created through Flow designer Action.
Can this be done?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-24-2023 02:44 AM
Hi @Rakshanda Kunte ,
You can only do it by maintaining some sort of information in the form to identify how the the change request is created, you can either have a field on the table to identify if the flow has created the change or was done some other way.
If you are using system user as Flow run as , then you can make that basis for building your UI policy for the team,
else you will need to have a field, to contain how exactly the change is created and then use it for UI policy.
Aman Kumar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-24-2023 03:13 AM
HI @Rakshanda Kunte ,
I trust you are doing great.
- Open the ServiceNow instance and navigate to the Change Form.
- In the Form Designer, locate the URL Type field (Alert URL).
- Edit the properties of the field and find the "Visibility" or "Display" option.
- Add a condition to control the visibility of the field based on the source of creation.
- To check if the change is created through the Flow Designer Action, you can use a script condition like the following:
// Check if change is created through Flow Designer Action
if (current.sys_created_by_flow_action) {
// Change is created through Flow Designer Action, make the field visible
gs.log("Change is created through Flow Designer Action");
g_form.setDisplay('alert_url', true); // Replace 'alert_url' with the actual field name
} else {
// Change is created through other means, hide the field
gs.log("Change is not created through Flow Designer Action");
g_form.setDisplay('alert_url', false); // Replace 'alert_url' with the actual field name
}
- Save the changes and test it by creating a change through the Flow Designer Action and another change through different means. The URL Type field should only be visible for changes created through the Flow Designer Action.
Was this answer helpful?
Please consider marking it correct or helpful.
Your feedback helps us improve!
Thank you!
Regards,
Amit Gujrathi