<?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>Modify Multi Value CDT</title><link>https://community.appian.com/discussions/f/general/19772/modify-multi-value-cdt</link><description>I&amp;#39;ve defined a CDT as a Multi Value. At run time I will have &amp;#39;n&amp;#39; instances of the object. During runtime I wish to update a specific field for one of the instances of the object but I&amp;#39;m not seeing how to address the field correctly. 
 I cant use array</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Modify Multi Value CDT</title><link>https://community.appian.com/thread/77363?ContentTypeID=1</link><pubDate>Tue, 20 Oct 2020 07:44:50 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:639f49f7-9447-4c80-958d-ece9134def9b</guid><dc:creator>parula0001</dc:creator><description>&lt;p&gt;Thanks Mike and Gangadhar for your help.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Modify Multi Value CDT</title><link>https://community.appian.com/thread/77354?ContentTypeID=1</link><pubDate>Mon, 19 Oct 2020 17:44:40 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:355fb4f2-75b0-4482-bb56-1885046b9e32</guid><dc:creator>Mike Schmitt</dc:creator><description>&lt;p&gt;If the change you need will be relatively simple though, you can probably get away with just using the data outputs tab to write a new value directly into the array member and field in question.&amp;nbsp; Configured like this:&lt;br /&gt;&lt;img src="/resized-image/__size/320x240/__key/communityserver-discussions-components-files/11/pastedimage1603129457051v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;(note, i&amp;#39;m using a random CDT from my system, your property names etc will be different, but the configuration is otherwise the same).&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Modify Multi Value CDT</title><link>https://community.appian.com/thread/77353?ContentTypeID=1</link><pubDate>Mon, 19 Oct 2020 17:38:29 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:64efa73e-db3c-4a8d-bdab-6e120745c036</guid><dc:creator>Mike Schmitt</dc:creator><description>[quote userid="49454" url="~/discussions/f/general/19772/modify-multi-value-cdt/77345"]emailDetails is a Multiple value variable. [/quote]
&lt;p&gt;The node input needs to be configured that way also.&amp;nbsp; I can tell from your screenshot that it isn&amp;#39;t.&amp;nbsp; Gangad&amp;#39;s comment earlier is correct, you would need to check the &amp;quot;multiple&amp;quot; checkbox for it in the node input configuration.&lt;br /&gt;&lt;img src="/resized-image/__size/320x240/__key/communityserver-discussions-components-files/11/pastedimage1603129107004v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;However it&amp;#39;s probably easiest to do this processing in the Data Output tab, as I mentioned earlier, using a solution along the lines of what Gangad posted in the more recent comment.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Modify Multi Value CDT</title><link>https://community.appian.com/thread/77350?ContentTypeID=1</link><pubDate>Mon, 19 Oct 2020 16:49:34 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:b1a47679-29cb-4226-b47a-50a8bdfa473d</guid><dc:creator>gangadharr0001</dc:creator><description>&lt;p&gt;You try below code .You need to use in &lt;span&gt;updatedictionary in script task&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;a!localVariables(&lt;br /&gt; local!a: {&lt;br /&gt; {fromId:&amp;quot;parul@abc&amp;quot;, fromName:&amp;quot;test&amp;quot;, toIds:1, ccIds:23, bccIds:2, subject:&amp;quot;sd&amp;quot;, attachments:1, body:12, latestBody:12, hasattachments:12, emailid:2, hasAutoHeaders:true},&lt;br /&gt; {fromId:&amp;quot;xyz@comp&amp;quot;, fromName:&amp;quot;test&amp;quot;, toIds:1, ccIds:2, bccIds:3, subject:&amp;quot;sd&amp;quot;, attachments:2, body:1, latestBody:1, hasattachments:21, emailid:12, hasAutoHeaders:false}&lt;/p&gt;
&lt;p&gt;},&lt;br /&gt; local!b:true,&lt;br /&gt; a!forEach(&lt;br /&gt; items: local!a,&lt;br /&gt; expression: updatedictionary(&lt;br /&gt; fv!item,&lt;br /&gt; {hasAutoHeaders: local!b}&lt;br /&gt; )&lt;br /&gt; )&lt;br /&gt; )&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Modify Multi Value CDT</title><link>https://community.appian.com/thread/77348?ContentTypeID=1</link><pubDate>Mon, 19 Oct 2020 16:30:45 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:a63140c9-26c0-4be6-88b7-44b2ff62160a</guid><dc:creator>parula0001</dc:creator><description>&lt;p&gt;Hi&amp;nbsp;&lt;a href="/members/gangadharr0001"&gt;gangadharr0001&lt;/a&gt;, emailDetails is a CDT&amp;nbsp;&amp;nbsp;&lt;img src="/resized-image/__size/320x240/__key/communityserver-discussions-components-files/11/pastedimage1603125113058v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;I want to enter&amp;nbsp;headersPresent variable in the instance of emailDetails, when i am trying to do that by the following expression rule it&amp;#39;s adding the headersPresent in the first instance of emailDetails.&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="/resized-image/__size/320x240/__key/communityserver-discussions-components-files/11/pastedimage1603124585355v3.png" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;For example: As the emailDetails is multi-valued it&amp;nbsp;is coming as&amp;nbsp;-&lt;/p&gt;
&lt;p&gt;&amp;nbsp;[fromId=parul@abc, fromName=, toIds=, ccIds=, bccIds=, subject=, attachments=, body=, latestBody=, hasattachments=, emailid=, hasAutoHeaders=true],[fromId=xyz@comp, fromName=, toIds=, ccIds=, bccIds=, subject=, attachments=, body=, latestBody=, hasattachments=, emailid=, hasAutoHeaders=false]&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;It is changing the hasAutoHeaders to true in the first instance as you can see when it should change the hasAutoHeaders to true in the second instance.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Please read the above main explanation.&lt;/p&gt;
&lt;p&gt;&amp;quot;&lt;/p&gt;
&lt;p&gt;I cant use array[1].field as that&amp;#39;s only addressing the first instance. So for example I have at run time the multi Value CDT with the values :&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Instance1 Instance2 Instance3&lt;/p&gt;
&lt;p&gt;Field1(Text)&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;A&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;D&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; G&lt;/p&gt;
&lt;p&gt;Field2(Text)&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;B&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;E&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;H&lt;/p&gt;
&lt;p&gt;Field3(Boolean)&amp;nbsp; true&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;false&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;false&lt;br /&gt;&lt;br /&gt;I want to change Instance3 Field 3 from false to true&lt;/p&gt;
&lt;p&gt;&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Hope its clear now. Thanks&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Modify Multi Value CDT</title><link>https://community.appian.com/thread/77346?ContentTypeID=1</link><pubDate>Mon, 19 Oct 2020 16:11:17 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:d855fa78-fdfc-47d5-8c7e-97efa1d26700</guid><dc:creator>gangadharr0001</dc:creator><description>&lt;p&gt;You can make it emailDetails as Array for that just click on the multple check box and in the output tab stored values just pass data back to PV (emailDetials).and also As i understood that you want manipulate multiple instances so for that you can use updateDictionary in the script task&amp;nbsp; after data back to PV if im not wrong .&lt;/p&gt;
&lt;p&gt;if im wrong please elaborate your actual scenario with screenshots&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Thanks&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Modify Multi Value CDT</title><link>https://community.appian.com/thread/77345?ContentTypeID=1</link><pubDate>Mon, 19 Oct 2020 15:57:38 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:7d55a027-b1a5-47ed-b112-e82b7b07ab24</guid><dc:creator>parula0001</dc:creator><description>&lt;p&gt;emailDetails is a Multiple value variable. I am not getting the option to add in the second instance in output tab too.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Can i use stored at index of in output tab, if yes can you help me with how?&lt;/p&gt;
&lt;p&gt;Thanks.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Modify Multi Value CDT</title><link>https://community.appian.com/thread/77344?ContentTypeID=1</link><pubDate>Mon, 19 Oct 2020 15:49:56 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:50dbe959-c5ce-4f40-afe5-ad77bd7b6eec</guid><dc:creator>Mike Schmitt</dc:creator><description>&lt;ol&gt;
&lt;li&gt;The &amp;quot;emailDetails&amp;quot; input isn&amp;#39;t configured as an array - why?&lt;/li&gt;
&lt;li&gt;Why are you doing this in the Inputs tab?&amp;nbsp; It&amp;#39;s usually easier to do data manipulations in the Outputs tab.&lt;/li&gt;
&lt;/ol&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Modify Multi Value CDT</title><link>https://community.appian.com/thread/77343?ContentTypeID=1</link><pubDate>Mon, 19 Oct 2020 15:27:26 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:81906f10-0fda-48eb-8c12-b6c54f2c8285</guid><dc:creator>parula0001</dc:creator><description>&lt;p&gt;I am modifying the highlited variable,&amp;nbsp;but email Details have 3 instances and it is modifying it in the first instance. How do i get it to modify it in the second instance, For&amp;nbsp;ex i want to&amp;nbsp;add/modify in emailDetails[2].hasAutoHeaders.&lt;img src="/resized-image/__size/320x240/__key/communityserver-discussions-components-files/11/pastedimage1603121247967v4.png" alt=" " /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Modify Multi Value CDT</title><link>https://community.appian.com/thread/77340?ContentTypeID=1</link><pubDate>Mon, 19 Oct 2020 14:39:55 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:205c68b5-407d-4755-a8e3-39998ae828aa</guid><dc:creator>Mike Schmitt</dc:creator><description>&lt;p&gt;Please post a screenshot and/or code for what you&amp;#39;re currently trying in your process model - I can&amp;#39;t tell based on just the detail you&amp;#39;ve provided here.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>