<?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 to save array of values in CDT in process model</title><link>https://community.appian.com/discussions/f/new-to-appian/26654/how-to-save-array-of-values-in-cdt-in-process-model</link><description>For example, I have process variables arrays 
 name : {&amp;quot;a&amp;quot;,&amp;quot;b&amp;quot;,&amp;quot;c&amp;quot;,&amp;quot;d&amp;quot;}, 
 age : {1,2,3,4}, 
 email : {&amp;quot;@e&amp;quot;,&amp;quot;@r&amp;quot;,&amp;quot;@t&amp;quot;,&amp;quot;@w&amp;quot;} and I have a CDT which has {name,age,email} How can I save those array values in my CDT in process model? bcz when I try to use</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: how to save array of values in CDT in process model</title><link>https://community.appian.com/thread/104645?ContentTypeID=1</link><pubDate>Wed, 23 Nov 2022 13:38:33 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:5637a0c6-88b4-45ed-82c2-1d09a4b2c45a</guid><dc:creator>tanujd6440</dc:creator><description>&lt;p&gt;Thanks it has worked&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: how to save array of values in CDT in process model</title><link>https://community.appian.com/thread/104644?ContentTypeID=1</link><pubDate>Wed, 23 Nov 2022 13:36:50 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:28f681c6-98a1-4972-8194-082963521c48</guid><dc:creator>Greg Wheeler</dc:creator><description>&lt;p&gt;It is not performant or considered best practice to have a single field contain an array of items. I would recommend you go back to your initial interface and update the rule input to be an array. Check out this pattern on Appian Documentation&amp;nbsp;&lt;a href="https://docs.appian.com/suite/help/22.4/recipe-add-edit-and-remove-data-in-an-inline-editable-grid.html"&gt;https://docs.appian.com/suite/help/22.4/recipe-add-edit-and-remove-data-in-an-inline-editable-grid.html&lt;/a&gt;&amp;nbsp;and look at how local!employees (line 11) is creating a list of arrays. Once you have reviewed the pattern to see how new employees are added to the local variable, you can reconstruct your interface to allow the same behavior.&amp;nbsp;Eventually, you can pass that array of items into the process where the Write to DSE node will see that each array should represent a row in the db.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: how to save array of values in CDT in process model</title><link>https://community.appian.com/thread/104642?ContentTypeID=1</link><pubDate>Wed, 23 Nov 2022 13:06:17 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:2799019b-74ce-4943-aa3d-aa9392baa52b</guid><dc:creator>Amaan Shekh</dc:creator><description>&lt;p&gt;you are writing the data (param3) right? were you able to store multiple data in it ? from your process instance photo it shows only one set of data(first values).&lt;/p&gt;
&lt;p&gt;if thats the case then -&amp;nbsp;&lt;br /&gt;check if you variable param3 can have multiple values&lt;br /&gt;&lt;img src="/resized-image/__size/320x240/__key/communityserver-discussions-components-files/62/pastedimage1669208713877v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;and try storing the data into the variable like this&amp;nbsp;&lt;pre class="ui-code" data-mode="text"&gt;a!localVariables(
  local!name:{1,2,3,4},
  local!age:{&amp;quot;10&amp;quot;,&amp;quot;20&amp;quot;,&amp;quot;30&amp;quot;,&amp;quot;40&amp;quot;},
  local!param3:  a!forEach(
    items:local!name,
    expression:&amp;#39;type!{urn:com:appian:types:CP}CP_uiDataBase&amp;#39;(
      test_int: local!name[fv!index],
      test_text: local!age[fv!index],
      test_date: null
    ) 
  ),
  local!param3
)&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: how to save array of values in CDT in process model</title><link>https://community.appian.com/thread/104641?ContentTypeID=1</link><pubDate>Wed, 23 Nov 2022 13:03:22 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:73c71889-554f-451b-9cd4-8bd8afd63ea2</guid><dc:creator>vinays024987</dc:creator><description>&lt;p&gt;You should first cast this data to your CDT.&lt;/p&gt;
&lt;p&gt;Check this out:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;a!localVariables(
  local!data:{
    name : {&amp;quot;a&amp;quot;,&amp;quot;b&amp;quot;,&amp;quot;c&amp;quot;,&amp;quot;d&amp;quot;},

    age : {1,2,3,4},

    email : {&amp;quot;@e&amp;quot;,&amp;quot;@r&amp;quot;,&amp;quot;@t&amp;quot;,&amp;quot;@w&amp;quot;}
  },
  a!forEach(
    items: local!data.name,
    expression: type!&amp;lt;&amp;lt;cdt_name&amp;gt;&amp;gt;(
      name: fv!item,
      age: index(local!data.age,fv!index,{}),
      email:index(local!data.email,fv!index,{})
    )
  )
)&lt;/pre&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;This is not the most appropriate way, But it will work.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: how to save array of values in CDT in process model</title><link>https://community.appian.com/thread/104640?ContentTypeID=1</link><pubDate>Wed, 23 Nov 2022 12:44:13 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:6e8d4d18-b918-4519-9db0-bfe0be2a4d75</guid><dc:creator>tanujd6440</dc:creator><description>&lt;p&gt;Multiple checkbox is greyed out&lt;br /&gt;&lt;img alt=" " src="/resized-image/__size/320x240/__key/communityserver-discussions-components-files/62/pastedimage1669207140825v1.png" /&gt;&lt;br /&gt;&lt;br /&gt;&lt;img src="/resized-image/__size/320x240/__key/communityserver-discussions-components-files/62/pastedimage1669207520042v1.png" alt=" " /&gt;&lt;br /&gt;&lt;br /&gt;for more clarity, Im pasting the script task where im passing the array values to cdt,&lt;br /&gt;&lt;img alt=" " src="/resized-image/__size/320x240/__key/communityserver-discussions-components-files/62/pastedimage1669207269683v2.png" /&gt;&lt;br /&gt;&lt;br /&gt;&lt;img alt=" " src="/resized-image/__size/320x240/__key/communityserver-discussions-components-files/62/pastedimage1669207333323v3.png" /&gt;&lt;br /&gt;&lt;img alt=" " src="/resized-image/__size/320x240/__key/communityserver-discussions-components-files/62/pastedimage1669207355439v4.png" /&gt;&lt;br /&gt;&lt;br /&gt;&lt;img alt=" " src="/resized-image/__size/320x240/__key/communityserver-discussions-components-files/62/pastedimage1669207445385v5.png" /&gt;&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: how to save array of values in CDT in process model</title><link>https://community.appian.com/thread/104638?ContentTypeID=1</link><pubDate>Wed, 23 Nov 2022 12:34:06 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:c3ad703e-fc87-4814-a413-2dd915f9a0c7</guid><dc:creator>Amaan Shekh</dc:creator><description>&lt;p&gt;when you have arrays of value(CDT) and you want to write all to rows in database then you have to config this in &amp;quot;write to data store entity node&amp;quot;&amp;nbsp;&lt;img alt=" " src="/resized-image/__size/320x240/__key/communityserver-discussions-components-files/62/pastedimage1669206801333v1.png" /&gt;&amp;nbsp;below name and type there is a checkbox multiple(for your data input) , try to select it and then try writing to the data store entity&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: how to save array of values in CDT in process model</title><link>https://community.appian.com/thread/104637?ContentTypeID=1</link><pubDate>Wed, 23 Nov 2022 12:33:27 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:dfa1db87-70fb-42e6-bfa3-40108afb149d</guid><dc:creator>tanujd6440</dc:creator><description>&lt;p&gt;yes&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: how to save array of values in CDT in process model</title><link>https://community.appian.com/thread/104636?ContentTypeID=1</link><pubDate>Wed, 23 Nov 2022 12:32:29 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:0897143c-ab07-4284-9621-88cf525c3e8b</guid><dc:creator>vinodm0002</dc:creator><description>&lt;p&gt;&lt;span&gt;Did you check about the Multiple checkbox is checked for the data input you would have created?&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>