<?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>Editable Grid Issue : Not able to  remove and update data in database</title><link>https://community.appian.com/discussions/f/user-interface/18557/editable-grid-issue-not-able-to-remove-and-update-data-in-database</link><description>When I try to remove grid row that time shows this error : &amp;quot;An error occurred while executing a save: Expression evaluation error at function &amp;#39;remove&amp;#39; [line 103]: Invalid index (3) for list: valid range is 1...1&amp;quot; 
 When I try to Update grid row that time</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Editable Grid Issue : Not able to  remove and update data in database</title><link>https://community.appian.com/thread/73062?ContentTypeID=1</link><pubDate>Thu, 02 Apr 2020 18:47:57 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:2f3f637c-c8c0-4346-ad47-756b2bb922f7</guid><dc:creator>kunald0002</dc:creator><description>&lt;p&gt;&lt;em&gt;&lt;span&gt;rule!CustomerInfo_ExpRule() : its fetch the data from database &amp;amp; populate that data on the grid&lt;/span&gt;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;below query i write in this exp rule :&lt;/p&gt;
&lt;p&gt;a!queryEntity(&lt;br /&gt; entity: cons!DSE_CustomerInfo,&lt;br /&gt; query: a!query(&lt;br /&gt; pagingInfo: a!pagingInfo(&lt;br /&gt; startIndex: 1,&lt;br /&gt; batchSize: -1&lt;/p&gt;
&lt;p&gt;),&lt;br /&gt; selection:a!querySelection(&lt;br /&gt; columns: {&lt;br /&gt; a!queryColumn( field: &amp;quot;Name&amp;quot;),&lt;br /&gt; a!queryColumn( field: &amp;quot;Address&amp;quot;),&lt;br /&gt; a!queryColumn( field: &amp;quot;OrgName&amp;quot;),&lt;br /&gt; a!queryColumn( field: &amp;quot;Salary&amp;quot;),&lt;br /&gt; a!queryColumn( field: &amp;quot;ContactNo&amp;quot;),&lt;br /&gt; a!queryColumn( field: &amp;quot;Emaild&amp;quot;),&lt;br /&gt; a!queryColumn( field: &amp;quot;Location&amp;quot;)&lt;br /&gt; &lt;br /&gt; }&lt;br /&gt; )&lt;/p&gt;
&lt;p&gt;)&lt;/p&gt;
&lt;p&gt;)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Editable Grid Issue : Not able to  remove and update data in database</title><link>https://community.appian.com/thread/73061?ContentTypeID=1</link><pubDate>Thu, 02 Apr 2020 18:05:04 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:54390c0f-e6f3-42bf-aa58-a34af7c776b3</guid><dc:creator>Mike Schmitt</dc:creator><description>&lt;p&gt;I think your local variable should be named in the standard convention of&amp;nbsp;&lt;em&gt;local!customer&lt;/em&gt; instead of&amp;nbsp;&lt;em&gt;ri!customer&lt;/em&gt; unless you have an unusually important reason for doing it that way.&lt;/p&gt;
&lt;p&gt;Aside from that: what is the output of your rule&amp;nbsp;&lt;em&gt;&lt;span&gt;rule!CustomerInfo_ExpRule()&lt;/span&gt;&lt;/em&gt;?&amp;nbsp; If it&amp;#39;s not actually producing an array of CDT, then you could be getting the attached error, but it&amp;#39;s hard to tell either way without seeing a sample of its output.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Editable Grid Issue : Not able to  remove and update data in database</title><link>https://community.appian.com/thread/73059?ContentTypeID=1</link><pubDate>Thu, 02 Apr 2020 17:59:39 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:0afa8ea5-d4c9-4131-8686-7d7191766ae0</guid><dc:creator>kunald0002</dc:creator><description>&lt;p&gt;&lt;span&gt;Hi Mike,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Now I replace the local!customer with ri!Customer :&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;load(&lt;/span&gt;&lt;br /&gt;&lt;span&gt;ri!Customer: rule!CustomerInfo_ExpRule()&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Please check below&amp;nbsp;snippet for remove the row :&amp;nbsp;&lt;span&gt;&amp;quot;An error occurred while executing a save: Expression evaluation error at function &amp;#39;remove&amp;#39; [line 103]: Invalid index (3) for list: valid range is 1...1&amp;quot;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;a!imageField(&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;br /&gt; label: &amp;quot;delete&amp;quot; &amp;amp; fv!index,&lt;br /&gt; images: a!documentImage(&lt;br /&gt; document: a!iconIndicator(&amp;quot;REMOVE&amp;quot;),&lt;br /&gt; altText: &amp;quot;Remove Customer&amp;quot;,&lt;br /&gt; caption: &amp;quot;Remove &amp;quot; &amp;amp; fv!item.Name,&lt;br /&gt; link: a!dynamicLink(&lt;br /&gt; value: fv!index,&lt;br /&gt; saveInto: {a!save(ri!Customer, remove(ri!Customer, save!value)),&lt;br /&gt; a!save(ri!DeletedCustomer,remove(ri!DeletedCustomer,fv!item.Id)),&lt;br /&gt; a!deleteFromDataStoreEntities(&lt;br /&gt; a!entityDataIdentifiers(&lt;br /&gt; entity: cons!DSE_CustomerInfo,&lt;br /&gt; identifiers: ri!DeletedCustomer&lt;br /&gt; )&lt;br /&gt; )&lt;br /&gt; }&lt;br /&gt; )&lt;br /&gt; ),&lt;br /&gt; size: &amp;quot;ICON&amp;quot;&lt;br /&gt; )&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thanks,&lt;/p&gt;
&lt;p&gt;Kunal&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Editable Grid Issue : Not able to  remove and update data in database</title><link>https://community.appian.com/thread/73054?ContentTypeID=1</link><pubDate>Thu, 02 Apr 2020 16:54:43 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:0b18283a-753f-464d-be8d-4a600693dfe5</guid><dc:creator>Mike Schmitt</dc:creator><description>&lt;p&gt;You are creating a local variable, within&amp;nbsp;&lt;em&gt;load()&lt;/em&gt;,&amp;nbsp;called&amp;nbsp;&lt;strong&gt;ri!customer&lt;/strong&gt; (which is not a naming convention that should typically be used with local variables), based on&amp;nbsp;&lt;span&gt;&lt;em&gt;rule!CustomerInfo_ExpRule()&lt;/em&gt;.&amp;nbsp; But then when you generate your grid rows, you&amp;#39;re apparently also basing that directly on&amp;nbsp;&lt;em&gt;rule!CustomerInfo_ExpRule()&lt;/em&gt;.&amp;nbsp; And then finally, in your&amp;nbsp;&lt;em&gt;remove()&lt;/em&gt; statement, you&amp;#39;re attempting to remove directly from&amp;nbsp;&lt;em&gt;&lt;strong&gt;ri!customer&lt;/strong&gt;&lt;/em&gt;&lt;strong&gt;&lt;/strong&gt;.&amp;nbsp; This is fairly confusing, TBH - I would be surprised if there weren&amp;#39;t several issues with this at the moment.&amp;nbsp; I can see what you&amp;#39;re trying to do in a big picture sense, but I have no idea how you&amp;#39;re expecting it to work.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Also: when posting large code snippets like this, you should use &amp;quot;&lt;em&gt;Insert --&amp;gt; Insert Code&lt;/em&gt;&amp;quot; functionality within the text editor here, and paste the code into the resultant code boxes, making sure that proper indentation is preserved.&amp;nbsp; That honestly makes it a lot easier to read than 3 screens full of unindented unformatted post text.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>