Make field mandatory from flow designer

SD32
Kilo Contributor

Hello,

I would like to know how I can make field mandatory and show alert message once the record changes to a particular state.

  • Thanks.
1 ACCEPTED SOLUTION

UI Policy = Client Side. Flow Designer is not. So that's already a huge difference.

If my answer helped you in any way, please then mark it as helpful.

Kind regards,
Mark
2020, 2021 ServiceNow Community MVP
2020, 2021 ServiceNow Developer MVP

---

LinkedIn
Community article, blog, video list

 

Kind regards,

 

Mark Roethof

Independent ServiceNow Consultant

10x ServiceNow MVP

---

 

~444 Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field

LinkedIn

View solution in original post

9 REPLIES 9

I am trying to explore if we can use the UI policy functionality in flow designer by doing some scripting through the data pill picker. I am aware we can show some alert messages through Flow designer so wondering if we can make field mandatory. If not I have the basic solutions already available

UI Policy = Client Side. Flow Designer is not. So that's already a huge difference.

If my answer helped you in any way, please then mark it as helpful.

Kind regards,
Mark
2020, 2021 ServiceNow Community MVP
2020, 2021 ServiceNow Developer MVP

---

LinkedIn
Community article, blog, video list

 

Kind regards,

 

Mark Roethof

Independent ServiceNow Consultant

10x ServiceNow MVP

---

 

~444 Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field

LinkedIn

I am currently in a similar scenario. What I am trying to do is require (make mandatory) certain Catalog Variables that were previously hidden/not mandatory on the Catalog Item View, so that it forces the assignee of a Catalog Task to complete that particular field when the assignee attempts to close the task. Interested in any ideas you have for doing something like this.

How to refer the UI Policy to check the stage of the record as a condition? (For example, New, Assess, Accepted, Approved, In Progress etc.)

Richard P
Mega Guru

Actually...There is a solution to this.

Create a hidden field, call it say "Flow Designer Mandatory", consider how many functions you want from this, if there's only one then a checkbox will do.

But lets say you want differing mandatory fields at differing points in the flow. Then maybe a select box with multiple values, one for each stage of the differing mandatory stages.
Next create a client script, "on load" which checks the value of that field and will make mandatory when a user views.
 


Then use the client script to make the fields mandatory.



Like this.
In this case my trigger wont be hidden, I'll use a new state condition, the same as the select box mentioned above. But all we're doing server side is changing the value of a field (which can be done by the flow (update record) and also for my use case, manually, its the mere fact that that feild has a value of my detirmination that I can use the client script to onload, check for that value.

RichardP_0-1734521479589.png

 



Here I have set state to resolved on a CSM case at the end of the flow.  could just have easily set my hidden checkbox "Flow Designer Mandatory" to true.  whatever the trigger, its the flow that triggers it.

Now a simple client script, if my new field has the values I want, then set the fields I want as mandatory.  

RichardP_4-1734523663242.png

 

Of course I have an "if not" condition to clear the value, should the record be moved out of that state.