How to merge two catalog items flow into one in Flow desginer
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-28-2024 12:52 PM
Change request description field:
My expected result :
and here is the script I used in flow designer and I want to combine into one script that will display both add and delete action inside the description :
var aliasArr = fd_data._1__get_catalog_variables.liste_d_alias_dns_ajouter;
var description = "Comments: " + fd_data._1__get_catalog_variables.comments + "\n"+
"List of DNS aliases: " + "\n";
var j = 0 ;
for (var i = 0; i < aliasArr.length; i++) {
j = i + 1;
description += "Name["+j+"]: " + aliasArr[i].name + "\n" +
"Domain["+j+"]: " + aliasArr[i].domain + "\n" +
"Name or IP address["+j+"]: " + aliasArr[i].name_or_ip_address + "\n\n"
}
return description;
var aliasArr = fd_data._1__get_catalog_variables.list_of_dns_delete;
var description = "Comments: " + fd_data._1__get_catalog_variables.comments + "\n"+
"List of DNS aliases: " + "\n";
var j = 0 ;
for (var i = 0; i < aliasArr.length; i++) {
j = i + 1;
description += "Name["+j+"]: " + aliasArr[i].name_remove + "\n" +
"Domain["+j+"]: " + aliasArr[i].domain_remove + "\n" +
"Name or IP address["+j+"]: " + aliasArr[i].name_or_ip_address_remove + "\n\n"
}
return description;
Any help will be much appreciated.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-04-2024 09:11 AM
All good I misspelled a variable but now when using your script the change request is no longer created.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-05-2024 02:10 AM
Can you share the flow execution screenshot
Mark it helpful if this helps you to understand. Accept solution if this give you the answer you're looking for
Kind Regards,
Rohila V
2022-25 ServiceNow Community MVP