<?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 configure an array that is autopopulated by another array field to be saved in the database.</title><link>https://community.appian.com/discussions/f/user-interface/34305/how-to-configure-an-array-that-is-autopopulated-by-another-array-field-to-be-saved-in-the-database</link><description>Hello, 
 &amp;quot;Can you please help me? My array field, which is auto populated from another array field, takes the information but does not save it in the database. How can I adjust it to save?&amp;quot; 
 
 I intend to get &amp;quot;Codigo Finca&amp;quot; auto populate from a &amp;quot;Finca</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: How to configure an array that is autopopulated by another array field to be saved in the database.</title><link>https://community.appian.com/thread/131063?ContentTypeID=1</link><pubDate>Tue, 12 Mar 2024 14:57:56 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:b8d71841-1e58-41da-8761-b53d23b0e226</guid><dc:creator>MonicagVela</dc:creator><description>&lt;p&gt;Thanks a lot, I&amp;acute;ll try and get back. thanks also for refering to the blog.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to configure an array that is autopopulated by another array field to be saved in the database.</title><link>https://community.appian.com/thread/131003?ContentTypeID=1</link><pubDate>Tue, 12 Mar 2024 04:27:47 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:2a73ab8a-0e33-42d9-b76c-cea7937841b8</guid><dc:creator>Teja Kunchala</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;a!dropdownField(&lt;br /&gt; placeholder: &amp;quot;Select-Country&amp;quot;,&lt;br /&gt; choiceLabels: index(local!Countries,&amp;quot;country&amp;quot;,null()),&lt;br /&gt; choiceValues: index(local!Countries,&amp;quot;countryId&amp;quot;,null()),&lt;br /&gt; value: fv!item.country,&lt;br /&gt; saveInto: {fv!item.country,a!save(fv!item.state,null())}&lt;br /&gt; ),&lt;br /&gt; a!dropdownField(&lt;br /&gt; placeholder: &amp;quot;Select-state&amp;quot;,&lt;br /&gt; choiceLabels: if(a!isNullOrEmpty(fv!item.country),local!states.state,index(local!states[wherecontains(tointeger(fv!item.country),local!states.countryId)],&amp;quot;state&amp;quot;,null())),&lt;br /&gt; choiceValues: if(a!isNullOrEmpty(fv!item.country),local!states.stateId,index(local!states[wherecontains(tointeger(fv!item.country),local!states.countryId)],&amp;quot;stateId&amp;quot;,null())),&lt;br /&gt; value: fv!item.state,&lt;br /&gt; saveInto: {fv!item.state,&lt;br /&gt; }&lt;br /&gt; ),&lt;/p&gt;
&lt;p&gt;Local variables:-&lt;/p&gt;
&lt;p&gt;local!Countries:{&lt;br /&gt; a!map(countryId:1,country:&amp;quot;India&amp;quot;),&lt;br /&gt; a!map(countryId:2,country:&amp;quot;USA&amp;quot;)&lt;br /&gt; },&lt;br /&gt; local!states:{&lt;br /&gt; a!map(stateId:1,countryId:1,state:&amp;quot;Andhra Pradesh&amp;quot;),&lt;br /&gt; a!map(stateId:2,countryId:1,state:&amp;quot;Telangana&amp;quot;),&lt;br /&gt; a!map(stateId:3,countryId:2,state:&amp;quot;Canada&amp;quot;)&lt;br /&gt; },&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;Go through the code and follow logic for your code.&lt;br /&gt;Based on selected country, state choice values will be changed.&lt;/p&gt;
&lt;p&gt;Here wherecontains used to get the index of the match country and from local!states it will get the values based on the index.&lt;/p&gt;
&lt;p&gt;&lt;a id="" href="https://appianspace.com/2023/07/03/cascading-drop-down-in-appian/"&gt;https://appianspace.com/2023/07/03/cascading-drop-down-in-appian/&lt;/a&gt;&amp;nbsp;- If you are unable to understand the code, refer this.&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 configure an array that is autopopulated by another array field to be saved in the database.</title><link>https://community.appian.com/thread/130999?ContentTypeID=1</link><pubDate>Mon, 11 Mar 2024 21:39:54 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:50547a02-c3ee-4f73-a868-d6277cb8f9a1</guid><dc:creator>MonicagVela</dc:creator><description>&lt;p&gt;hello, thank to all for the replies.&lt;/p&gt;
&lt;p&gt;Tejakunchala, you are correct,&amp;nbsp; I&amp;acute;m&lt;span&gt;&amp;nbsp;trying to perform cascading dropdown like from first drop down based on selected value, I want to get the choice values in the second drop down ( autopopulate in the second dropdown).&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;This is a start form, so it&amp;acute;s is writng to a record on the PM.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;can you pls guide me on the code you are suggesting me.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;thanks a lot.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to configure an array that is autopopulated by another array field to be saved in the database.</title><link>https://community.appian.com/thread/130953?ContentTypeID=1</link><pubDate>Mon, 11 Mar 2024 05:36:00 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:4ff2291f-6351-45f5-aa05-4ae39d08ffaa</guid><dc:creator>Teja Kunchala</dc:creator><description>&lt;p&gt;Hi,&lt;br /&gt;Did got the question.&amp;nbsp;&lt;br /&gt;From my assumption,&lt;br /&gt;You are trying to perform cascading dropdown like from first drop down based on selected value you want to get the choice values in the second drop down&lt;br /&gt;If that is the case then use wherecontains in choice values and choicelables to get the value.&lt;br /&gt;Or&lt;br /&gt;If you are trying to write into database provide writerecord in submit button or use process model for writing the data to database.&lt;br /&gt;Provide detailed view if these are not the cases.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to configure an array that is autopopulated by another array field to be saved in the database.</title><link>https://community.appian.com/thread/130952?ContentTypeID=1</link><pubDate>Mon, 11 Mar 2024 04:58:02 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:c5de9de9-1d47-4845-b850-77d07775dddc</guid><dc:creator>prakhar2511</dc:creator><description>&lt;p&gt;Not sure but I think you want write a record using a array.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to configure an array that is autopopulated by another array field to be saved in the database.</title><link>https://community.appian.com/thread/130950?ContentTypeID=1</link><pubDate>Sun, 10 Mar 2024 21:05:00 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:7d01266e-d48c-4f9c-9d0f-5a163eabf624</guid><dc:creator>David Jimenez </dc:creator><description>&lt;p&gt;I assume that you are trying to update the record in the database, using the saveInto parameter in the dropdown.&lt;/p&gt;
&lt;p&gt;This will only update the record locally, but will not save it to the database. If you want to update the record in the database, you will have to use either the smart service Writerecords in a PMO or the a!writeRecords function in your interface&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to configure an array that is autopopulated by another array field to be saved in the database.</title><link>https://community.appian.com/thread/130942?ContentTypeID=1</link><pubDate>Sun, 10 Mar 2024 09:05:37 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:196cce66-8188-4099-96c5-58bb4ed4e2f7</guid><dc:creator>Stefan Helzle</dc:creator><description>&lt;p&gt;The code you shared does not include anything that would save data to the database.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to configure an array that is autopopulated by another array field to be saved in the database.</title><link>https://community.appian.com/thread/130939?ContentTypeID=1</link><pubDate>Sun, 10 Mar 2024 06:33:13 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:e3a0e17e-7869-422c-bd28-33e1e9a28b7b</guid><dc:creator>Dhananjay Kumar</dc:creator><description>&lt;p&gt;Please elaborate your ask&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to configure an array that is autopopulated by another array field to be saved in the database.</title><link>https://community.appian.com/thread/130937?ContentTypeID=1</link><pubDate>Sun, 10 Mar 2024 03:28:09 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:125822e9-9186-4fcb-9aef-bf8a31959ace</guid><dc:creator>Karumuru Abhishek</dc:creator><description>&lt;p&gt;Hi&amp;nbsp;&amp;nbsp; I did not get your question, could you give more context on this please&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>