<?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>Issue changing element of an array</title><link>https://community.appian.com/discussions/f/data/27157/issue-changing-element-of-an-array</link><description>Hi there, 
 I have an array local variable here, 
 using a!save(local!array[1], true) does not work. any idea what&amp;#39;s the problem? 
 
 
 regards, 
 Lin</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Issue changing element of an array</title><link>https://community.appian.com/thread/106703?ContentTypeID=1</link><pubDate>Fri, 13 Jan 2023 04:12:47 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:7cf80415-6961-41f7-87fa-ca981e7febe9</guid><dc:creator>Ramnadh Srikanth Vemakoti</dc:creator><description>&lt;p&gt;I tried with rule input still its working fine as stated by Chris and Richard. I took {false;false} as ri!array input, after clicking on the button below is the result, working as expected.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="/resized-image/__size/320x240/__key/communityserver-discussions-components-files/16/pastedimage1673583059438v1.png" /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Issue changing element of an array</title><link>https://community.appian.com/thread/106696?ContentTypeID=1</link><pubDate>Thu, 12 Jan 2023 23:20:42 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:0f84f9b9-0495-4500-a264-b8d44f491973</guid><dc:creator>linp0001</dc:creator><description>&lt;p&gt;if your first array1 is rule input, then you probably will have the issue. my case is like that, but once put into process model, then it works fine when test the process mode.&lt;/p&gt;
&lt;p&gt;Thanks for the help.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Issue changing element of an array</title><link>https://community.appian.com/thread/106688?ContentTypeID=1</link><pubDate>Thu, 12 Jan 2023 17:36:04 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:cf660355-df12-4ddd-b6f0-f9813b8f895e</guid><dc:creator>Richard Michaelis</dc:creator><description>&lt;p&gt;i am with chris here:&lt;br /&gt;&lt;img src="/resized-image/__size/320x240/__key/communityserver-discussions-components-files/16/pastedimage1673544980808v1.png" alt=" " /&gt;&lt;br /&gt;works absolutely fine. so we need more context,&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Issue changing element of an array</title><link>https://community.appian.com/thread/106681?ContentTypeID=1</link><pubDate>Thu, 12 Jan 2023 16:58:17 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:195b7971-5d09-4ad4-b9c2-b0abfa46b2fb</guid><dc:creator>Chris</dc:creator><description>&lt;p&gt;If you have any further issues, we will need to see the code surrounding the a!save() if possible.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Issue changing element of an array</title><link>https://community.appian.com/thread/106679?ContentTypeID=1</link><pubDate>Thu, 12 Jan 2023 16:44:05 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:8401658a-becb-4bfd-8588-54c214771737</guid><dc:creator>linp0001</dc:creator><description>&lt;p&gt;it;s just not working when just testing the interface, it seems working once put into the process model.&lt;/p&gt;
&lt;p&gt;Thanks,&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Issue changing element of an array</title><link>https://community.appian.com/thread/106598?ContentTypeID=1</link><pubDate>Wed, 11 Jan 2023 23:45:55 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:779ef451-5059-4532-ba91-ef567bfc43d9</guid><dc:creator>linp0001</dc:creator><description>&lt;p&gt;yes, but my local!array is defined like this (as the number of elements is vary, the array size will be same as the size of another arrary: somereferarray ):&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;local!array : a!forEach(&lt;br /&gt;&amp;nbsp; items: somereferarray,&lt;br /&gt;&amp;nbsp; expression: false&lt;br /&gt; ),&lt;/p&gt;
&lt;p&gt;then it does not work&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Issue changing element of an array</title><link>https://community.appian.com/thread/106597?ContentTypeID=1</link><pubDate>Wed, 11 Jan 2023 23:09:33 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:2f37d440-8c62-4c01-bbf8-fb326ea05035</guid><dc:creator>Chris</dc:creator><description>&lt;p&gt;Can you share more of your code performing the save?&amp;nbsp; Is this within a button?&amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Otherwise the a!save() expression you note above should&amp;nbsp;not have any issues when used within a user interaction.&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="csharp"&gt;a!localVariables(
  local!array: {false,false},
  {
    a!richTextDisplayField(
      value: a!forEach(
        items: local!array,
        expression: {
          tostring(fv!item),
          char(13)
        }
      )
    ),
    a!buttonArrayLayout(
      align: &amp;quot;START&amp;quot;,
      buttons: {
        a!buttonWidget(
          label: &amp;quot;Save&amp;quot;,
          saveInto: a!save(local!array[1],true)
        )
      }
    )
  }
)&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>