Get a first look at what's coming. The Developer Passport Australia Release Preview kicks off March 12. Dive in! 

Relabel field in form based on condition

armanoj
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

@armanoj 

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  ||  10x ServiceNow MVP  ||  ServiceNow Community Leader

View solution in original post

9 REPLIES 9

Mohammed8
Tera Sage

Hi @armanoj 

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

 

 

@armanoj  

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

 

Regards,

Zakir

GRC Issue triage