The CreatorCon Call for Content is officially open! Get started here.

Ui policy is not working.

Kishor O
Tera Sage

In catalog item there is field called [Product] it has (choice - none ,a,b,c.)

If Product is a or b there is another field called issue [severity] should be visible  (choices - none,one,two,three)

If severity is one or two or three there is another filed called [impacted count] should be visible.( choice -none, me, mew+few) 

 

Here the issue is if I select [Product] as C [severity] field is hiding but [Impacted count] is still visible.

 

*How many UI policy we need to write for this and what should be the conditions?

1 ACCEPTED SOLUTION

Hello, 

 

In your second ui policy, you canbuild the condition like this  :

Severity is one of [one, two, three] and

Product is one of [a, b] and it will work. 

View solution in original post

5 REPLIES 5

Zach Koch
Giga Sage

So you'll need two UI policies, and a one line of script will be needed in both to clear values, which if you don't you'll see similar behavior to what you're seeing now where Impacted count is still shown. Keep in mind, in the script that I have in my example, you'll need to replace the field name with your field name.

Here is the first UI policy

ZachKoch_4-1718733741961.png

 

Here is the script section on that UI policy

ZachKoch_1-1718733636777.png

 

Here is the second UI policy

ZachKoch_2-1718733689588.png

Here is the script section

ZachKoch_3-1718733707047.png

 

 

If this information helped resolve your issue, please remember to mark response correct and thumbs up to help future community members on this information, thanks!

@Zach Koch  This is not working for me I have created below 2 ui policies.

 

1)

KishorO_0-1718733923386.png

 

2)

KishorO_1-1718733942832.png

 

@Zach Koch 

If product is "a"  choice as variables severity and impacted count is showing and mandatroy but if select product is  "c" only severity is getting invisible not impacted count.

 

KishorO_0-1718734322591.png

 

As I mentioned, you have to click the script step, and add the line I put, with your field as the value, to clear out the value. The reason why it is still showing, is because without clearing that value, the original value you chose in Severity is still there, it's just hidden, which is causing impacted count to show.

If this information helped resolve your issue, please remember to mark response correct and thumbs up to help future community members on this information, thanks!