- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-21-2016 09:19 AM
Hi Friends,
We have a requirement, where we need to hide/visible a field based on a amount field(Field type is currency). For example, if the amount is less than 10K, fields need to visible, otherwise field should not visible.
For this we tried to do using UI policy and Client script. But during the form Load , it's working fine. But it's not working , during field value Change.
Please provide your inputs.
Thanks.
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-21-2016 09:27 AM
Use this script
if(parseFloat(newValue.split(';')[1])<10000){
g_form.setDisplay('field_name',true);
}
else{
g_form.setDisplay('field_name',false);
}

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-21-2016 01:36 PM
It will not display alert during form load. Change the value on which this onChange script is on and this will trigger this script.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-21-2016 01:49 PM
Hi Abhinay,
Script is not triggering during the field value change.
Thanks.
Peter

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-21-2016 01:51 PM
There should be something going on. Can you post a screenshot of entire form of your onChange client script. Also inspect the browser console for any errors.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-21-2016 02:01 PM
Hi Abhinay,
Please see the below screenshots of client script.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-21-2016 02:04 PM
Script looks ok. Did you reload the form before you test it. You can also flush cache by adding "/cache.do" to your base URL and test it again.