- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 hours ago
I need to add the condition in the UI policies that I need to run the script when the field changes not onload of the form, how to achieve this?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
an hour ago
Hi Khushbu,
1. UI Policy Configuration
- Uncheck:
- Keep:
This ensures the policy runs only when the field value changes.
2. If you want to strictly check field modification
Add script in UI Policy:
// your logic
}
3. Recommended (Best Practice)
Use onChange Client Script instead of UI Policy for better control:
if (isLoading || newValue == oldValue) {
return;
}
// your logic here
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
an hour ago
1)Uncheck the On load option in the UI Policy form.
(When On load is not selected, the UI Policy won’t run automatically when the form loads. Instead, it will only evaluate and trigger when the fields defined in the Conditions section are modified by the user.)
2) In the Advanced view, enable the Run scripts option.
Add your logic inside the onCondition() function within the Execute if true field (and the Execute if false field if needed).
If you want the Execute if false script to run when the condition is no longer satisfied, make sure the Reverse if false option is selected.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
35m ago
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
an hour ago
Hi Khushbu,
1. UI Policy Configuration
- Uncheck:
- Keep:
This ensures the policy runs only when the field value changes.
2. If you want to strictly check field modification
Add script in UI Policy:
// your logic
}
3. Recommended (Best Practice)
Use onChange Client Script instead of UI Policy for better control:
if (isLoading || newValue == oldValue) {
return;
}
// your logic here
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
35m ago
Thanks, this worked perfectly
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
an hour ago
1)Uncheck the On load option in the UI Policy form.
(When On load is not selected, the UI Policy won’t run automatically when the form loads. Instead, it will only evaluate and trigger when the fields defined in the Conditions section are modified by the user.)
2) In the Advanced view, enable the Run scripts option.
Add your logic inside the onCondition() function within the Execute if true field (and the Execute if false field if needed).
If you want the Execute if false script to run when the condition is no longer satisfied, make sure the Reverse if false option is selected.
