<?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>In array i have to update data to specific column tried using update array function</title><link>https://community.appian.com/discussions/f/process/34861/in-array-i-have-to-update-data-to-specific-column-tried-using-update-array-function</link><description>[ld_id=1188, ll_id=904, fl_id=, fm_id=, rsed_id=, appian_document_id=5357264, klt_id=, legacy_id=, description=, name=, createdby=testc, createdon=10/3/2022 7:14 PM, modifiedby=tects, modifiedon=10/3/2022 7:44 PM, inuse=1],[ld_id=, ll_id=904, fl_id=,</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: In array i have to update data to specific column tried using update array function</title><link>https://community.appian.com/thread/134671?ContentTypeID=1</link><pubDate>Fri, 03 May 2024 10:10:47 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:4897c616-fedd-4c79-a4ad-fbb2c74fdbc4</guid><dc:creator>dharanik2600</dc:creator><description>&lt;p&gt;Thank you all for your suggestions&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: In array i have to update data to specific column tried using update array function</title><link>https://community.appian.com/thread/134642?ContentTypeID=1</link><pubDate>Fri, 03 May 2024 01:35:43 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:f9b24e55-7666-4927-bf3f-5df68472e767</guid><dc:creator>venkatasaisatyanarayanaraot1090</dc:creator><description>&lt;p&gt;Hi dharanik2600,&lt;/p&gt;
&lt;p&gt;Since you want to update a particular row based on doc id,&lt;/p&gt;
&lt;p&gt;please try the following code,&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;updatearray(
array: index( pv!documentsToUpdateInDB,wherecontains( tointeger(&amp;quot;appian_document_id&amp;quot;), tointeger(index(pv!documentsToUpdateInDB,&amp;quot;appian_document_id&amp;quot;,null)), null),
index: &amp;quot;description&amp;quot;,
value: &amp;quot;Text to be replaced&amp;quot;
)&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;if you are looking to update an array of elements you can use foreach on top the code.&lt;/p&gt;
&lt;p&gt;please let me know if it works or not.&lt;/p&gt;
&lt;p&gt;thanks&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: In array i have to update data to specific column tried using update array function</title><link>https://community.appian.com/thread/134630?ContentTypeID=1</link><pubDate>Thu, 02 May 2024 17:01:01 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:41ceb103-507f-4c4c-b124-d80457a91ce4</guid><dc:creator>Konduru Chaitanya</dc:creator><description>&lt;p&gt;Hello &lt;a href="/members/dharanik2600"&gt;dharanik2600&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;could you please try the below piece of code to evaluate and update. Please let me know if I missed something.&lt;br /&gt;&lt;br /&gt;&lt;pre class="ui-code" data-mode="text"&gt;a!forEach(
  items: pv!documentsToUpdateInDB,
  expression: if(
    a!isNullOrEmpty(fv!item.description),
    fv!item,
    a!update(
      data: fv!item,
      index: &amp;quot;description&amp;quot;,
      value: &amp;quot;The Parties, by mutual agreement, due to the Partial Surrender of the Demised Premises&amp;quot;
    )
  )
)&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: In array i have to update data to specific column tried using update array function</title><link>https://community.appian.com/thread/134627?ContentTypeID=1</link><pubDate>Thu, 02 May 2024 16:26:34 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:e7cdc104-d4a9-4ab4-a326-9214cccc74eb</guid><dc:creator>Dan Lluhi</dc:creator><description>&lt;p&gt;The &amp;quot;index&amp;quot; parameter is just the integer index, so in your example you&amp;#39;d want an expression that evaluates to the number 2. The final value would be the replacement CDT (with your updated description field)&lt;/p&gt;
&lt;p&gt;See &lt;a href="https://docs.appian.com/suite/help/24.1/fnc_array_updatearray.html#parameters"&gt;the docs page&lt;/a&gt;&amp;nbsp;for more info on how to use this function properly&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>