- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-02-2022 03:26 AM
Hello,
We have created a database view and was wondering if it's possible to concatenate two columns using a script (see below).
If so can this script can also be applied to a report or automated indicator?
- var now_GR = new GlideRecord('u_chg_cab_definition_view');
Solved! Go to Solution.
- Labels:
-
Dashboard
-
Performance Analytics
-
Reporting
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-02-2022 05:36 AM
Hi,
you can make that field as calculated and store the concatenated value
Use advanced view
Something like this; you can use current object and dot walk to whichever field you wish
(function calculatedFieldValue(current) {
// Add your code here
return current.u_cab_meeting + ' ' + current.cab_definition;
})(current);
If my response helped please mark it correct and close the thread so that it benefits future readers.
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-02-2022 05:24 AM
Thank you both for your input.
Any idea how I would update the dictionary record for "CAB definition" to concatenate a dot walk within "CAB meeting"? i.e. u_cab_meeting.cab_definition.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-02-2022 05:36 AM
Hi,
you can make that field as calculated and store the concatenated value
Use advanced view
Something like this; you can use current object and dot walk to whichever field you wish
(function calculatedFieldValue(current) {
// Add your code here
return current.u_cab_meeting + ' ' + current.cab_definition;
})(current);
If my response helped please mark it correct and close the thread so that it benefits future readers.
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-03-2022 02:19 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-03-2022 02:27 AM
since you will already have custom field which concatenates both; add that to database view
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader