Concatenation in breakdown script
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
yesterday
my breakdown script is as below:
current.vulnerability.sys_id;
how do I concatenate a letter 'a' to this?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
yesterday
Hi @venori26 ,
You add try adding a literal 'a' at end of value like
var id = current.getValue('vulnerability'); // sys_id as string
var val = id + "a"; //concatenating a
and use val as variable value in next lines wherever is it useful.
Thanks,
Bhimashankar H
-------------------------------------------------------------------------------------------------
If my response points you in the right directions, please consider marking it as 'Helpful' & 'Correct'. Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
17 hours ago
Thank you a lot..Sorry I am new to ServiceNow..I have been trying to do a simple concatenation in breakdown mapping and have not been successful so far. I have a parent table and child table..The plugin ids are available in child table, along with their descriptions. I need to concatenate plugin id and summary.
Parent table: sn_vul_vulnerability_item
Reference field: vulnerability
child : sn_vul_third_party_entry
what I tried is current.vulnerability.sys_id + '-'+ current.vulnerability.summary;
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10 hours ago
Hi @venori26 ,
Share the more context about your issue, the error you got is not to use the current.
or
use without current something like
vulnerability.name+"-"+vulnerability.summary
Thanks,
Bhimashankar H
-------------------------------------------------------------------------------------------------
If my response points you in the right directions, please consider marking it as 'Helpful' & 'Correct'. Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
8 hours ago
Hello Sir,
Thanks for your response.
I am attaching a screenshot to show the kind of dashboard I am developing. Its a Pivot Table type visualization. the data is related to vulnerabilites that are generated as a result of scanning cloud assets and its related metrics.
If you see the first column, it is a concatenation of plugin ID and Summary.
Parent table: sn_vul_vulnerable_items
Reference field: vulnerability
Child table: sn_vul_third_party_entry
plugin id and summary needs to be concantenated from child table. Something like, vulnerability.id+'-'+vulnerability.summary. I am trying to implement this in scripted breakdown but concatenation is not happening
But concatenation is not happening.