<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://community.appian.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Hi,  I have two arrays say array1 and array2. I want to add the e</title><link>https://community.appian.com/discussions/f/rules/1844/hi-i-have-two-arrays-say-array1-and-array2-i-want-to-add-the-e</link><description>Hi, I have two arrays say array1 and array2. I want to add the elements of these two arrays to get the resulting array. for example array1 is {1,2,3} and array2 is {1,2,3} and the resultant array should be {2,4,6} How this can be achieved. Any suggestion</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Hi,  I have two arrays say array1 and array2. I want to add the e</title><link>https://community.appian.com/thread/108627?ContentTypeID=1</link><pubDate>Tue, 28 Feb 2023 17:38:36 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:a3b9347f-0993-4e42-9f87-92be1ad3b9d8</guid><dc:creator>chiragj3013</dc:creator><description>&lt;p&gt;You can also use &lt;strong&gt;joinarray&lt;/strong&gt; function in which you have add both the array elements.&lt;br /&gt;EXample-&amp;gt;&amp;nbsp;&lt;strong&gt;a!localVariables(&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt; local!a:{1,2,3},&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt; local!b:{1,2,3},&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt; joinarray(local!a+local!b),&lt;/strong&gt;&lt;br /&gt; &lt;br /&gt;&lt;strong&gt;)&lt;/strong&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Hi,  I have two arrays say array1 and array2. I want to add the e</title><link>https://community.appian.com/thread/108608?ContentTypeID=1</link><pubDate>Tue, 28 Feb 2023 11:51:22 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:ae87eddf-61f2-41b3-a76f-55f8a8357b89</guid><dc:creator>Stefan Helzle</dc:creator><description>&lt;p&gt;A nine year old thread?&lt;/p&gt;
&lt;p&gt;But ... you would have to add a check for equal length, or pad the shorter array with zeros.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Hi,  I have two arrays say array1 and array2. I want to add the e</title><link>https://community.appian.com/thread/108602?ContentTypeID=1</link><pubDate>Tue, 28 Feb 2023 10:41:24 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:e08e2d2f-de11-45f4-a694-efa5035c019d</guid><dc:creator>Ayush Agrawal</dc:creator><description>&lt;p&gt;But what if when the array&amp;#39;s are not in same length.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Hi,&lt;br /&gt;&lt;br /&gt;I have two arrays say array1 and array2.&lt;br /&gt;I want to add the e</title><link>https://community.appian.com/thread/6523?ContentTypeID=1</link><pubDate>Sat, 04 Jan 2014 16:49:46 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:52feecd1-a844-4462-9acd-350df5ed298e</guid><dc:creator>Sathya Srinivasan</dc:creator><description>you can also try apply(fn!sum, merge(array1, array2))&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Hi,&lt;br /&gt;&lt;br /&gt;I have two arrays say array1 and array2.&lt;br /&gt;I want to add the e</title><link>https://community.appian.com/thread/6522?ContentTypeID=1</link><pubDate>Sat, 04 Jan 2014 14:25:17 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:e3f94fb5-3780-484c-adde-f1048741e084</guid><dc:creator>rishirajk</dc:creator><description>If the arrays are of same length then you can go with following expression&lt;br /&gt;={1,2,3}+{1,2,3}. Otherwise you&amp;#39;ll have to pad one array with 0s so that both arrays are of same length and then you can use the same expression.&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>