Relabel field in form based on condition

Arun_Manoj
Mega Sage

Hi,

One field needs to relabel on form based on the condition.

where issue type= risk event

the issue owner field label needs to relabel to Risk event manager.

 

please suggest a solution

1 ACCEPTED SOLUTION

@Arun_Manoj 

Already informed -> its not possible in workspace

💡 If my response helped, please mark it as correct and close the thread 🔒— this helps future readers find the solution faster! 🙏

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

View solution in original post

9 REPLIES 9

Mohammed8
Mega Sage

Hi @Arun_Manoj 

Here is the pseudo code for client script on Change. You can try this and tweak the fields as per your use case:


function onChange(control, oldValue, newValue, isLoading) {
if (isLoading) return;

if (newValue === 'risk_event') {
g_form.setLabelOf('issue_owner', 'Risk Event Manager');
} else {
g_form.setLabelOf('issue_owner', 'Issue Owner'); // Default label
}
}

 

If you find this answer useful, please mark it as helpful/solution accepted.

 

Thanks and Regards,

Mohammed Zakir

I tried the same not working, need the change workspace

 

 

@Arun_Manoj  

can u share which module form is it, i will check from my side.

 

Regards,

Zakir

GRC Issue triage