- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-17-2020 04:59 PM
Hello!
I have 4 fields - A, B, C, D.
On initial load of the form, only A is visible.
Fields B, C, D becomes visible when a value is selected from A which is a reference field.
The requirement is to clear B, C, D of values then hide it when A is updated to empty or another value is selected.
I created a UI Policy that is triggered when A is empty and see photo below.
The above works but only if B, C, D have values. If it has no value, the values are cleared but the fields are still viisble.
Please help!
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-18-2020 06:54 AM
Hi,
Well, the solution would be to make them mandatory once field A has a value (using that same UI policy) = setting mandatory > true.
So remove the mandatory checkmark in each of the variables individually (if it's checked now, which I assume it is)...
THEN....when field A has no value, they aren't mandatory anymore thus they will hide...and then my small script above clears the values out of b,c,d.
Please mark reply as Helpful/Correct, if applicable. Thanks!
Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-18-2020 06:54 AM
Hi,
Well, the solution would be to make them mandatory once field A has a value (using that same UI policy) = setting mandatory > true.
So remove the mandatory checkmark in each of the variables individually (if it's checked now, which I assume it is)...
THEN....when field A has no value, they aren't mandatory anymore thus they will hide...and then my small script above clears the values out of b,c,d.
Please mark reply as Helpful/Correct, if applicable. Thanks!
Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-19-2020 05:14 AM
Hi,
Let me know if you need further assistance, but I believe I've covered everything here?
If you don't mind, please also mark my reply above (that has the Correct answer) as Correct as well.
Thanks!
Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-18-2020 06:02 AM
Hello,
Here you have two scenarios when A is empty and when A changes from one value to another.
UI policy condition can handle the first scenario that is when A is empty but there is no condition to check if the value of A had changed.
So for second scenario, you have to write a onchange client script on field A to clear the value of B and C, you can use the same script as mentioned by Allen in your client script.
Regards,
Sateesh Kumar Devadoss.