<?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 can i Update 5 rows in CDT at one time?</title><link>https://community.appian.com/discussions/f/general/21914/how-can-i-update-5-rows-in-cdt-at-one-time</link><description>Hi, 
 
 I have a cdt in which a column is SNO as 
 SNO name 
 1 abc 
 2 def 
 3 ghi 
 4 jkl 
 I want to update only SNO as 2,3,4,5 and it should be 3,4,5,6 . I don&amp;#39;t want to update 1 . Which logic i should write?</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: How can i Update 5 rows in CDT at one time?</title><link>https://community.appian.com/thread/86485?ContentTypeID=1</link><pubDate>Thu, 30 Sep 2021 17:50:08 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:4c783325-f33f-4ee6-83a4-d44bdc47cfd9</guid><dc:creator>hrishikeshd997</dc:creator><description>&lt;p&gt;Another possible solution to avoid a loop is to use updatecdt() function.&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;updatecdt(
  ri!yourCDT, /* ca be a local variable or rule input */
  {
    /* Creating an array of first element and {(rest of the elements)+1} */
    SNO: append(ri!yourCDT.SNO[1], ldrop(ri!yourCDT.SNO, 1) + 1)
  }
)&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How can i Update 5 rows in CDT at one time?</title><link>https://community.appian.com/thread/85857?ContentTypeID=1</link><pubDate>Fri, 17 Sep 2021 13:20:17 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:02331b7d-033b-4d01-8e52-974ce366fe99</guid><dc:creator>ashutoshg0001</dc:creator><description>&lt;p&gt;ok Thanks&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How can i Update 5 rows in CDT at one time?</title><link>https://community.appian.com/thread/85842?ContentTypeID=1</link><pubDate>Fri, 17 Sep 2021 09:01:41 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:83517374-dccc-4bb4-9edf-d28b429c8c5c</guid><dc:creator>Richard Michaelis</dc:creator><description>&lt;p&gt;this should do the trick&lt;br /&gt;&lt;pre class="ui-code" data-mode="text"&gt;a!forEach(
    items: {yourCDTarray},
    expression:if(
        fv!Index&amp;gt;1,
        a!update(
            data:fv!item,
            index:&amp;quot;sno&amp;quot;,
            value:fv!index+1
        ),
        {}
    )
)&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How can i Update 5 rows in CDT at one time?</title><link>https://community.appian.com/thread/85841?ContentTypeID=1</link><pubDate>Fri, 17 Sep 2021 08:58:31 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:26488e70-1b5d-43ff-b056-8d8008665b05</guid><dc:creator>ashutoshg0001</dc:creator><description>&lt;p&gt;In an interface via button action&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How can i Update 5 rows in CDT at one time?</title><link>https://community.appian.com/thread/85840?ContentTypeID=1</link><pubDate>Fri, 17 Sep 2021 08:55:40 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:a48f0897-1df0-43d9-bcd8-97001b4f2dd8</guid><dc:creator>Richard Michaelis</dc:creator><description>&lt;p&gt;Do you want to do it&amp;nbsp;during/after loading by a query rule, right before storing in a smartservice, in an interface via button action or Link?&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>