Hide Fields in the section based on the field value on the record producer form
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Friday
we have record producer which will create a record in target table upon submission and now my requirement is to hide particular fields in the section on the form based on the other filed value on the form for the new records which will be creating from now.
For that I have written a onload catalog client script as below but still is not hiding the field as expected, your help with your expertise would be helpful.
Thanks in advance!!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Friday
@ankurbawisk - Can you please help me with the above Query
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Friday
is this normal client script or catalog client script running on Target record?
if this is normal client script and u_approval_type is variable name then use this syntax to get the value
I assume you are comparing correct value
syntax to get variable value is variables.variableName
function onLoad() {
//Type appropriate comment here, and begin script below
if (g_form.isNewRecord() && g_form.getValue('variables.u_approval_type') == 'Process Exception Request') {
g_form.setDisplay('u_standard_azl_solution_arch', false);
}
}
💡 If my response helped, please mark it as correct ✅ and close the thread 🔒— this helps future readers find the solution faster! 🙏
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Friday
Thanks for the response @Ankur Bawiskar I have written Catalog client script on the record producer, will that work? or can i make it as client script on target table?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Friday
is "u_standard_azl_solution_arch" this a variable of field?
Try with normal client script on that table.
💡 If my response helped, please mark it as correct ✅ and close the thread 🔒— this helps future readers find the solution faster! 🙏
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
