<?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>update one field of CDT array</title><link>https://community.appian.com/discussions/f/data/27194/update-one-field-of-cdt-array</link><description>Hi there, 
 I have one CDT array 
 { 
 {a: 1, 
 b: &amp;quot;R&amp;quot; 
 }, 
 {a: 2, 
 b: &amp;quot;E&amp;quot; 
 }, 
 {a: 3, 
 b: &amp;quot;R&amp;quot; 
 }, 
 } 
 what&amp;#39;s the good way to update field b from &amp;quot;R&amp;quot; to &amp;quot;T&amp;quot;. tried this, it does not work. 
 a!update(CDT.b, {1, 3}, &amp;quot;T&amp;quot;) 
 anyone has the experience</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: update one field of CDT array</title><link>https://community.appian.com/thread/106776?ContentTypeID=1</link><pubDate>Mon, 16 Jan 2023 17:25:58 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:2e867552-983b-4083-85b5-ccfb6dc351ac</guid><dc:creator>linp0001</dc:creator><description>&lt;p&gt;Thanks!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: update one field of CDT array</title><link>https://community.appian.com/thread/106746?ContentTypeID=1</link><pubDate>Fri, 13 Jan 2023 21:21:58 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:54667922-bc15-4e39-95ef-c9cee2a8786f</guid><dc:creator>davel001150</dc:creator><description>&lt;p&gt;Noice!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: update one field of CDT array</title><link>https://community.appian.com/thread/106744?ContentTypeID=1</link><pubDate>Fri, 13 Jan 2023 21:02:08 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:541b302c-2432-4356-9e84-6f449c37ef56</guid><dc:creator>Mike Schmitt</dc:creator><description>[quote userid="132000" url="~/discussions/f/data/27194/update-one-field-of-cdt-array/106743#106743"]If you need null safety, index() function on line 4[/quote]
&lt;p&gt;fun fact: as far as i can tell, &amp;quot;fv!item&amp;quot; is null-safe for dot properties much like &amp;quot;fv!row&amp;quot; is - meaning, accessing a nonexistent property simply results in a null rather than an error.&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="java"&gt;a!localVariables(
  local!asdf: {
    {
      idx: 1
    },
    {
      idx: 2
    }
  },
  
  a!forEach(
    local!asdf,
    fv!item.name
  )
)&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src="/resized-image/__size/320x240/__key/communityserver-discussions-components-files/16/pastedimage1673643776686v1.png" alt=" " /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: update one field of CDT array</title><link>https://community.appian.com/thread/106743?ContentTypeID=1</link><pubDate>Fri, 13 Jan 2023 20:54:32 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:b2ab4d41-d08c-48a5-a93b-142e9db086ad</guid><dc:creator>davel001150</dc:creator><description>&lt;p&gt;If you need null safety, index() function on line 4&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: update one field of CDT array</title><link>https://community.appian.com/thread/106742?ContentTypeID=1</link><pubDate>Fri, 13 Jan 2023 20:53:52 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:c19e9f3a-e65d-4d97-8c55-ea6d2d6028cf</guid><dc:creator>davel001150</dc:creator><description>&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;a!forEach(
    items: local!list,
    expression: if(
        fv!item.b = &amp;quot;R&amp;quot;,
        update(
            data: fv!item,
            index: &amp;quot;b&amp;quot;,
            value: &amp;quot;T&amp;quot;
        ),
        fv!item
    )
)&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>