- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-25-2022 01:29 PM
Hi,
Would like to change the label for a field when the other field values changes in Form View.
Please suggest on this.
Thank you
Kirankumar Nalla
Solved! Go to Solution.
- Labels:
-
Problem Management
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-25-2022 08:47 PM
Hi
I cannot recommend this. Labels should stay consistent in all experiences (UI16, Service Portal, Workspaces, Mobile Apps). As a user, I would be irritated if a field label changes unexpected.
So maybe you explain better the underlying business requirement and don't ask for a special solution.
Kind regards
Maik
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-25-2022 08:47 PM
Hi
I cannot recommend this. Labels should stay consistent in all experiences (UI16, Service Portal, Workspaces, Mobile Apps). As a user, I would be irritated if a field label changes unexpected.
So maybe you explain better the underlying business requirement and don't ask for a special solution.
Kind regards
Maik
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-26-2022 06:23 PM
Hi @kirankumar,
You can write UI policy.
1) Add your condition in the condition field of UI policy
2) In the Script section add below code in the Execute if true section.
e.g.
g_form.setLabelOf('short_description', 'Problem Statement');
OR
You can write on change client script.
e.g.
function onChange(control, oldValue, newValue, isLoading) {
if (isLoading) {
return;
}
if (g_form.getValue('request_type') == 'Create') {
g_form.setLabelOf('phone', 'New Phone');
g_form.setLabelOf('address', 'New Address');
}
else {
g_form.setLabelOf('phone', 'Phone');
g_form.setLabelOf('address', 'Address');
}
}
Thanks,
Neha
Please mark helpful/correct.