- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-21-2025 07:06 PM
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.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-21-2025 11:23 PM
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-21-2025 07:14 PM - edited 07-21-2025 07:15 PM
Hi @RyoyaFukuda
Consider this solution for your case
var fieldValue = gForm.getValue('your_field_name');
if (fieldValue !== 'test1' || fieldValue !== 'test2') {
return true;
}
return false;
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-21-2025 07:28 PM
I would appreciate it if you could provide the condition for the UI policy.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-21-2025 07:30 PM
Hello @RyoyaFukuda
Try this in UI policy, the condition can be written as:
Field IS NOT test1
AND
Field IS NOT test2
This should works because:
!(A || B) = !A && !B
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-21-2025 08:01 PM
@Juhi Poddar
thank you
Does this apply to Related Field as well?
I could confirm that it worked fine for normal fields, but when I looked at the referenced field, it did not work.