UI Policy misbehaving with showFieldMessage

conradofonseca
Tera Contributor

Hello everyone,

 

I have a catalog item with 3 checkbox variables in a row. When the second checkbox is set to true, a message should show up below the third checkbox, and it should reverse if false. 

 

This is what is happening:

  1. Second checkbox is set to true > The message shows up correctly, below the third checkbox.
  2. Second checkbox changes its state to false > The message stays in place, when it should disappear.
  3. Third checkbox changes its state, regardless of its previous one> The message disappears, when it shouldn't because the condition evaluates the second checkbox and not this one.

 

When I configure the message to show up below the second checkbox, it works perfectly, but it is not where I need the message to show. 

 

Am I missing anything?

 

Thanks!

 

 

Cat Item Variables.pngUI Policy conditions.pngUI Policy script.png

 

2 ACCEPTED SOLUTIONS

Sanjana8
Kilo Guru

Hi @conradofonseca 

 

Please try making the following changes in script.

Sanjana8_0-1720603890454.png

 

(Hello user is just a demo msg I have added to test, pls add your required message)

 Please mark helpful if you accept the solution.

 

Thanks

Sanjana

View solution in original post

Hi @conradofonseca,

 

Try writing a onChange Client script of the third checkbox: 

and show the field message if the second checkbox is true, else hide it.

 

View solution in original post

6 REPLIES 6

Hi @conradofonseca 

 

It is working as per your expectation with the solution which I proposed.

Sanjana8_0-1720774528930.pngSanjana8_1-1720774555878.png

Sanjana8_2-1720774591695.png

 

 

 

Hi @conradofonseca,

 

Try writing a onChange Client script of the third checkbox: 

and show the field message if the second checkbox is true, else hide it.