<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>question Need to combine two list collector values in flow designer using custom action servicenow in Community Central forum</title>
    <link>https://www.servicenow.com/community/community-central-forum/need-to-combine-two-list-collector-values-in-flow-designer-using/m-p/3093233#M1526</link>
    <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;There are two list collector fields on the from (service catalog form) and we need to combine the values selected for those two list collector values in flow designer. I have written one custom script with the below code by taking inputs as list collector fields with the type 'string' and given a try with&amp;nbsp; output type as 'array-string/string' but still it is not working. Can someone helps on this please&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;var teamselected = inputs.teammember.toString();&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;var teamselectedsplit =teamselected.split(',')&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;var scrumselected =inputs.scrummaster.toString();&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;var scrumsplitedusers =scrumselected.split(',')&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;var au = new ArrayUtil();&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;var finallist = GlideArrayUtil.union(teamselectedsplit,scrumsplitedusers);&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;outputs.userssplitedafter =finallist.toString();&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Anusha&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
    <pubDate>Fri, 01 Nov 2024 05:31:51 GMT</pubDate>
    <dc:creator>anushadande1793</dc:creator>
    <dc:date>2024-11-01T05:31:51Z</dc:date>
    <item>
      <title>Need to combine two list collector values in flow designer using custom action servicenow</title>
      <link>https://www.servicenow.com/community/community-central-forum/need-to-combine-two-list-collector-values-in-flow-designer-using/m-p/3093233#M1526</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;There are two list collector fields on the from (service catalog form) and we need to combine the values selected for those two list collector values in flow designer. I have written one custom script with the below code by taking inputs as list collector fields with the type 'string' and given a try with&amp;nbsp; output type as 'array-string/string' but still it is not working. Can someone helps on this please&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;var teamselected = inputs.teammember.toString();&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;var teamselectedsplit =teamselected.split(',')&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;var scrumselected =inputs.scrummaster.toString();&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;var scrumsplitedusers =scrumselected.split(',')&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;var au = new ArrayUtil();&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;var finallist = GlideArrayUtil.union(teamselectedsplit,scrumsplitedusers);&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;outputs.userssplitedafter =finallist.toString();&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Anusha&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Fri, 01 Nov 2024 05:31:51 GMT</pubDate>
      <guid>https://www.servicenow.com/community/community-central-forum/need-to-combine-two-list-collector-values-in-flow-designer-using/m-p/3093233#M1526</guid>
      <dc:creator>anushadande1793</dc:creator>
      <dc:date>2024-11-01T05:31:51Z</dc:date>
    </item>
    <item>
      <title>Re: Need to combine two list collector values in flow designer using custom action servicenow</title>
      <link>https://www.servicenow.com/community/community-central-forum/need-to-combine-two-list-collector-values-in-flow-designer-using/m-p/3093285#M1529</link>
      <description>&lt;P&gt;&lt;a href="https://www.servicenow.com/community/user/viewprofilepage/user-id/757467"&gt;@anushadande1793&lt;/a&gt;&amp;nbsp;Create a flow variable and combine both value in set variable so you can use flow variable with having all value from both list collectors,hope this helps you.&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Fri, 01 Nov 2024 06:23:30 GMT</pubDate>
      <guid>https://www.servicenow.com/community/community-central-forum/need-to-combine-two-list-collector-values-in-flow-designer-using/m-p/3093285#M1529</guid>
      <dc:creator>Community Alums</dc:creator>
      <dc:date>2024-11-01T06:23:30Z</dc:date>
    </item>
    <item>
      <title>Re: Need to combine two list collector values in flow designer using custom action servicenow</title>
      <link>https://www.servicenow.com/community/community-central-forum/need-to-combine-two-list-collector-values-in-flow-designer-using/m-p/3093373#M1531</link>
      <description>&lt;P&gt;Hi Abhay,&lt;/P&gt;&lt;P&gt;Thanks for the Reply.&lt;/P&gt;&lt;P&gt;Can you please help me how to combine both values using flow variables.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Anusha&lt;/P&gt;</description>
      <pubDate>Fri, 01 Nov 2024 08:06:13 GMT</pubDate>
      <guid>https://www.servicenow.com/community/community-central-forum/need-to-combine-two-list-collector-values-in-flow-designer-using/m-p/3093373#M1531</guid>
      <dc:creator>anushadande1793</dc:creator>
      <dc:date>2024-11-01T08:06:13Z</dc:date>
    </item>
    <item>
      <title>Re: Need to combine two list collector values in flow designer using custom action servicenow</title>
      <link>https://www.servicenow.com/community/community-central-forum/need-to-combine-two-list-collector-values-in-flow-designer-using/m-p/3094547#M1552</link>
      <description>&lt;P&gt;use this sample code with changing variables&lt;/P&gt;&lt;P&gt;// Initialize an empty array for the combined list&lt;/P&gt;&lt;P&gt;var combinedList = [];&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;// Add all elements from the first list collector, if present&lt;/P&gt;&lt;P&gt;combinedList = combinedList.concat(inputs.listCollector1 || []);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;// Add only unique elements from the second list collector&lt;/P&gt;&lt;P&gt;(inputs.listCollector2 || []).forEach(function(item) {&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; if (combinedList.indexOf(item) === -1) {&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; combinedList.push(item);&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; }&lt;/P&gt;&lt;P&gt;});&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;// Return the combined array to be assigned to the flow variable&lt;/P&gt;&lt;P&gt;combinedList;&lt;/P&gt;&lt;P&gt;Hope this will help.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 02 Nov 2024 10:10:08 GMT</pubDate>
      <guid>https://www.servicenow.com/community/community-central-forum/need-to-combine-two-list-collector-values-in-flow-designer-using/m-p/3094547#M1552</guid>
      <dc:creator>Community Alums</dc:creator>
      <dc:date>2024-11-02T10:10:08Z</dc:date>
    </item>
  </channel>
</rss>

