<?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>How I can save an array from a local variable into rule input?</title><link>https://community.appian.com/discussions/f/general/29060/how-i-can-save-an-array-from-a-local-variable-into-rule-input</link><description>Hi! 
 I&amp;#39;m trying to save values from a multiple dropdown into a rule input, but my code it&amp;#39;s not working. I proved a!forEach in my submit button, but when i press the button only save the last item of my array. 
 
 
 I hope you can help me. Thanks!</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: How I can save an array from a local variable into rule input?</title><link>https://community.appian.com/thread/114718?ContentTypeID=1</link><pubDate>Wed, 21 Jun 2023 15:50:44 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:5a81e904-b265-4681-9afe-3cd9dcd3dd6f</guid><dc:creator>Jos&amp;#233; Manuel Ojeda</dc:creator><description>&lt;p&gt;It&amp;#39;s working! Thanks a lot. I&amp;#39;ve thought about it for a while and couldn&amp;#39;t get the answer.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How I can save an array from a local variable into rule input?</title><link>https://community.appian.com/thread/114716?ContentTypeID=1</link><pubDate>Wed, 21 Jun 2023 15:42:21 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:ab02bdf3-90ba-4d03-899b-ff88eeff7533</guid><dc:creator>sanchitg0002</dc:creator><description>&lt;p&gt;Try this a!save&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="java"&gt;a!save(
  ri!cartaOrganismo,
  append(
    ri!cartaOrganismo,
    type!cartaOrganismoCDT(idOrganismo: fv!item.idOrganismo)
  )
)&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Replace type! with original CDT name.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>