- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-20-2024 11:04 PM
Hi,
I have a requirement where I have a selectBox field 'requested_priority' which is defaulted to 'low'. I have to display a field 'priority_justification if 'requested_priority' changed from 'low. I have written code, but 'priority_justification' is displayed irrespective. Kindly help.
function onChange(control, oldValue, newValue, isLoading) {
if (isLoading || newValue == '') {
return;
}
var rp = g_form.getValue("requested_priority");
if(rp!='low' || rp!=''){
g_form.setVisible("priority_justification", true);
}
}
Regards
Suman P.
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-20-2024 11:14 PM
Hi @Community Alums You can achieve this requirement with UI Policy which avoids scripting and follows best practice
Create a UI Policy with condition
requested_priority is "low" (select low from drop down)
Apply UI Policy action
create a UI Policy action for variable . Set visible to True
priority_justification
Harish

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-20-2024 11:14 PM
Hi @Community Alums You can achieve this requirement with UI Policy which avoids scripting and follows best practice
Create a UI Policy with condition
requested_priority is "low" (select low from drop down)
Apply UI Policy action
create a UI Policy action for variable . Set visible to True
priority_justification
Harish