<?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>Using the new a!update()</title><link>https://community.appian.com/discussions/f/rules/21555/using-the-new-a-update</link><description>Is is possible to update multiple fields of a CDT using the a!update()? The documentation shows that you can for a regular array, but with the CDT examples shown, it only updates one field at a time. When I test it out in an expression, it throws an error</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Using the new a!update()</title><link>https://community.appian.com/thread/84254?ContentTypeID=1</link><pubDate>Mon, 02 Aug 2021 16:51:14 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:47c75ab0-2aac-48f2-8a22-c9d0be3337cc</guid><dc:creator>alex.ladue</dc:creator><description>&lt;p&gt;This is a known bug with updating dictionaries and CDTs with a!update(). This will work as expected for maps and record data types. We are working to fix the issue, but I don&amp;#39;t have a timeline for the fix right now.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Using the new a!update()</title><link>https://community.appian.com/thread/84253?ContentTypeID=1</link><pubDate>Mon, 02 Aug 2021 16:38:08 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:15921cfc-667e-490a-a537-73e352edf5eb</guid><dc:creator>Mike Schmitt</dc:creator><description>&lt;p&gt;I mean, if you have to pull in (two[&lt;em&gt;&lt;strong&gt;!!&lt;/strong&gt;&lt;/em&gt;]) primitive looping/array functions to make one of the most basic use cases work, to me that defeats the entire purpose of the new Update function, when compared to &lt;strong&gt;&lt;em&gt;updateDictionary()&lt;/em&gt;&lt;/strong&gt;&lt;em&gt;&lt;/em&gt; which works just fine in one step.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Using the new a!update()</title><link>https://community.appian.com/thread/84252?ContentTypeID=1</link><pubDate>Mon, 02 Aug 2021 16:01:37 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:8fe50aae-5874-47c9-ba0e-103cd7681f8e</guid><dc:creator>Stewart Burchell</dc:creator><description>&lt;p&gt;You can use fn!reduce() in the same way you would with any list that you want to process against an initial value:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;fn!reduce(
a!update,
ri!submission,
fn!merge(
{&amp;quot;StatusID&amp;quot;, &amp;quot;SubmissionTypeID&amp;quot;},
{1, 2}
)&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;...but I take your point, it seems odd/inconsistent that it natively processes a list for maps but not for Dictionaries or CDTs.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Using the new a!update()</title><link>https://community.appian.com/thread/84249?ContentTypeID=1</link><pubDate>Mon, 02 Aug 2021 15:37:12 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:1798753a-c5be-4687-bd89-4674ef4f8f87</guid><dc:creator>Mike Schmitt</dc:creator><description>&lt;p&gt;I have reported this to Appian recently, because I found the same issue with testing.&amp;nbsp; It throws the same error when you try with either a Dictionary or with a CDT (surprisingly), but &lt;em&gt;&lt;strong&gt;works&lt;/strong&gt;&lt;/em&gt; if you feed it a MAP specifically.&amp;nbsp; Which is weird.&amp;nbsp; I was really looking forward to replacing the &amp;quot;update dictionary&amp;quot; plug-in, but as it stands, a!update() is not usable for that in 99% of my current use cases.&lt;/p&gt;
&lt;p&gt;Working (a!map):&lt;br /&gt;&lt;img alt=" " src="/resized-image/__size/320x240/__key/communityserver-discussions-components-files/15/pastedimage1627918772561v1.png" /&gt;&lt;/p&gt;
&lt;p&gt;Not working (dictionary):&lt;br /&gt;&lt;img alt=" " src="/resized-image/__size/320x240/__key/communityserver-discussions-components-files/15/pastedimage1627918826348v2.png" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Edit to add in retrospect: as of 21.4, the nonworking cases I mentioned earlier now seem to work.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>