- 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 02:12 PM
Still same issue even after flushing the cache. Client script is not triggering.
Thanks.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-21-2016 02:17 PM
For testing, remove everything and copy this script as is and reload the form and test it.
function onChange(control, oldValue, newValue, isLoading, isTemplate) {
if (isLoading || newValue === '') {
return;
}
alert(newValue);
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-21-2016 02:25 PM
HI Abhinay,
I have tried it. Alert is not coming.
Thanks.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-21-2016 02:27 PM
WOW. This is weird. Is this on your personal developer instance? I can look into it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-21-2016 02:30 PM
Yes, This is in personal developer instance.
Thanks
Peter