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.

 


Mark the response correct and helpful if the answer assisted your question.

View solution in original post

6 REPLIES 6

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

Hello Sanjana,

 

Thank you for your reply. It helped a little, now the message disappears when the checkbox changes from true to false. Why didn't it happen with the configuration I had, if I have the checkbox "reverse if false" selected?

 

There is one last thing to fix: if the second checkbox is true and the message is displayed, it should not disappear when the 3rd checkbox changes its state. 

 

Thanks

Hi @conradofonseca 

 

Do you mean that message should disappear when the 3rd checkbox is true?

The message showing or hiding should depend strictly on the second checkbox, and it should ignore the behaviour of the third checkbox. I don't know why, but right now it disappears when the 3rd checkbox changes its state.