Unable to hide currency field
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-05-2023 10:40 PM
Hi,
i have a requirement, i want to hide currency field based on request type. When request type is Disposal or Mass disposal then the currency type should visible.
i have tried with UI policies' but didn't work then, i wrote Onchange client script still it showing the field when the request type is none, when the page loads if i select disposal or mass disposal the field is visible but when i change the request type again to none the currency field remains visible.
This is the script i written please suggest if anything wrong.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-05-2023 10:54 PM
Hi @shaik23 ,
Can you please share the UI Policy and UI Policy Action? the best suggested way to achieve this will be via UI policy only...
If you still wish to continue with Client script, let me know!
Thanks and Regards,
Rahul
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-06-2023 02:30 AM
i have tried with Ui policies and ui Action as visible true but it didn't work. i have attached screen shot
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-06-2023 09:22 PM
@shaik23 ,
Try with below code!
if (isLoading || newValue === '') {
return;
}
g_form.setVisible('u_book_value', false);
var requestType = g_form.getValue('u_request_type');
var bookValueField = g_form.getControl('u_book_value');
if (requestType === 'Disposal' || requestType === 'Mass Disposal') {
g_form.setVisible('u_book_value', true);
}
}
Thanks and Regards,
Rahul