- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-15-2024 05:18 AM
Hi,
Created a simple client script for a return check box at On Change.
its working if i mark it checked, but once i make it uncheck then return date is not getting invisible. Not throwing any error also.
Please assist me.
Regards
Vishwa
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-15-2024 05:22 AM - edited 09-15-2024 05:52 AM
Mandatory fields cannot be hidden, so setMandatory false before setVisible false in your condition when the box is unchecked / false. Also consider using setDisplay in place of setVisible to consume the empty space. If this is all you are doing in the script, it is recommended to use a UI Policy for these actions.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-15-2024 05:43 AM - edited 09-15-2024 05:44 AM
You have 'newValue === '' ' in your first 'if'. So if it's empty, it returns.
But why are you using a client script for this? A UI policy is the easiest way to do this, with not necessary scripting.
Please mark any helpful or correct solutions as such. That helps others find their solutions.
Mark
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-15-2024 05:22 AM - edited 09-15-2024 05:52 AM
Mandatory fields cannot be hidden, so setMandatory false before setVisible false in your condition when the box is unchecked / false. Also consider using setDisplay in place of setVisible to consume the empty space. If this is all you are doing in the script, it is recommended to use a UI Policy for these actions.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-15-2024 05:43 AM - edited 09-15-2024 05:44 AM
You have 'newValue === '' ' in your first 'if'. So if it's empty, it returns.
But why are you using a client script for this? A UI policy is the easiest way to do this, with not necessary scripting.
Please mark any helpful or correct solutions as such. That helps others find their solutions.
Mark