Catalog item "clear the value" checkbox issue

Yogita11_
Tera Contributor

Hello, everyone.

 

Does anyone have a solution for the "clear the value" checkbox issue on UI Policy?

When we check the checkbox, the variable values on RITM disappear, and when we uncheck the checkbox, a problem occurs on the form (after checking and unchecking the conditional checkbox variable, the previous value of the variable that was supposed to be cleared remains). Has anyone found a solution? that it should function as "clear the value" on the portal but not vanish the value on the RITM.

 

Thank you

1 ACCEPTED SOLUTION

Just tested, it is indeed your setup that is wrong. You should use Clear the Variable value = true in combination with Visible = false.

 

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

16 REPLIES 16

Gotta test it out to reproduce, though just based on your input: Visible = true and Clear the variable value = true looks a really odd scenario. I would expect Clear the variable value = true only with Visible = false.

 

Kind regards,

 

Mark Roethof

Independent ServiceNow Consultant

10x ServiceNow MVP

---

 

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

LinkedIn

Yogita11__0-1724914454721.png

Hello @Mark Roethof ,

 

Really Thank you for your reply. As you mentioned, use "Clear the value" with the combination visible false. Yes, it appears to be a good combination; the value must be clear when the variable does not fill.

 

But that will not work for me because, as shown in the above screenshot, single line text must be visible true when the checkbox is checked, whereas your suggestion will work in the opposite direction. So I'm really excited to find out what the solution is in my case. I want to show the single line text variable when the checkbox is checked, and if the value is filled in single line text. and the checkbox is unchecked, it should clear the value at that time. However, doing this wrong setup. clearing the value on the RITM when user submit form by filling the single line text variable. as shown in the screenshots below.

Yogita11__4-1724916545551.png

-------------

Yogita11__5-1724916570749.png

 


To clear up any confusion, here are the steps to reproduce the issue:
1] Two variables.

Yogita11__1-1724916125855.png

2] UI Policy

Yogita11__2-1724916182558.pngYogita11__3-1724916212923.png

I know the combination is incorrect, but what is the solution for my case? For example, if the checkbox is unchecked, the value on the portal should be cleared so that the user does not see the old value when they check it again. I have already read your previous article but have not found a solution to this case.

 

If you help us resolve this conflict, it will benefit a large number of people.

 

Thank you

 

I've verified this yesterday already, this is all you need (and ofcourse another UI Policy for the devices):

 

MarkRoethof_0-1724917086724.png

 

 

Kind regards,

 

Mark Roethof

Independent ServiceNow Consultant

10x ServiceNow MVP

---

 

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

LinkedIn

Just tested, it is indeed your setup that is wrong. You should use Clear the Variable value = true in combination with Visible = false.

 

Kind regards,

 

Mark Roethof

Independent ServiceNow Consultant

10x ServiceNow MVP

---

 

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

LinkedIn

Thank you so much Mark. To clarify my confusion regarding misconfiguration.