- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
6 hours ago
Hi Community Experts
We have a requirement where different views are being followed on a Table:
Form/List in both Native/ Workspace
Eg - Audit Engagement form will be holding View A/ View B/ etc. based on Groups on Audit Workspace
Here, the ask is to show the Field "Engagement Lead" as Audit Lead for View A and Inspection Lead for View B on Audit Workspace
As per my knowledge, we are able to use getView() to control g_form.setLabel() in NATIVE UI. But have not been able to reach any conclusion in WORKSPACE.
Although we have Workspace View Rules to apply different UI Views for Workspace YET
"Is it possible to have extract the View applied and set Dynamic Labels based on the view applied on Workspace?"
Kindly share the various possibilities for the above scenario.
Thanks in advance.
Best Regards,
Sameekshya
Solved! Go to Solution.
- Labels:
-
Architect
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
4 hours ago
In order to run separate logic based on view, you have the option to uncheck option "Global" and enter into field "View" the specific view where the script should be executed.
As for changing the label of a field, one would use method setLabelOf, not setLabel.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
6 hours ago - last edited 3 hours ago
you can change field label in native & in workspace
Is it not working for you?
💡 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
3 hours ago
Hi @Ankur Bawiskar
I tried checking The g_form.setLabelOf() function in Client Script as shared by -O- and it shows the result on Workspace. Could you please confirm if its the same with you OR is it inconsistent?
Want to make sure its functionally accurate and feasible across.
Thanks in advance
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 hours ago
if it is working means it's supported
All good.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
4 hours ago
In order to run separate logic based on view, you have the option to uncheck option "Global" and enter into field "View" the specific view where the script should be executed.
As for changing the label of a field, one would use method setLabelOf, not setLabel.
