UI polices condition

RyoyaFukuda
Tera Contributor
Hi all
I would like to create a similar condition in a UI policy, using the following client script condition as a reference.
The feild type for which “newValue” is set is String.

if
(!(newValue=== 'test1' ||newValue=== 'test2' )){
}

I am having trouble getting it to work.
1 ACCEPTED SOLUTION

Hello @RyoyaFukuda 

  • Since you're using dot-walking and the content field is not directly present on the form, UI Policy changes won’t reflect immediately. This is because dot-walked fields are not truly client-side editable and don’t trigger UI Policy evaluations the same way direct fields do.
  • However, if you're working with a reference field that is directly on the form (not dot-walked), UI Policies should work as expected in real time.

Hope this helps!

 

"If you found my answer helpful, please like and mark it as an "accepted solution". It helps future readers to locate the solution easily and supports the community!"

 

Thank You
Juhi Poddar

View solution in original post

12 REPLIES 12

@RyoyaFukuda 

This should work for reference field as well.

@Juhi Poddar 
The UI policy did not work just by changing the items.
After saving and loading the screen again, the UI policy works.

Is this something I am missing in my settings, or in the case of the reference field, the data is on the server side and does not work when the item is changed?

@RyoyaFukuda 

No, this should not be the issue.
If the field is present on the form, UI Policies are client-side and should react immediately when a value is changed, even for reference fields, without needing to save or reload the form.
Please share a screenshot of your configuration setup so we can analyze it better and help you troubleshoot.

「Category 1 Level」is reference field and 「Conent」is String.

No matter what the 「Conent」 is, the UI policy action makes “u_int” read-only.

RyoyaFukuda_0-1753160413384.png

 

Hello @RyoyaFukuda, just realizing that dot walking has been used in UI policy. wondering whether dot walk works fine here as UI policy is designed for client side validation.

 

Regards,

Nishant