<?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>issue with read only grid selection</title><link>https://community.appian.com/discussions/f/user-interface/19461/issue-with-read-only-grid-selection</link><description>Hey All, 
 I have a read only grid with selectable rows. The use case is whenever an user selects a row , a modify button comes up. One interface opens afterwards, with the fields autopopulating from the selected grid values. Whenever I am updating any</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: issue with read only grid selection</title><link>https://community.appian.com/thread/76143?ContentTypeID=1</link><pubDate>Wed, 26 Aug 2020 08:17:02 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:4a0f05cf-d972-4f1f-aada-e0de25bb2e43</guid><dc:creator>Shikha</dc:creator><description>&lt;p&gt;Ok , so I did this in the grid code. I have removed append and difference code.The RI takes the last selected row value. On deselecting that row , RI becomes null. But the RI does not hold the previously selected rows due to absence of append obviously.&amp;nbsp; This causes an issue with grid selection as user can come back to previously selected row and modify that , not necessary that he modifies the last clicked row. The RI stores values for last clicked row and make that null on deselect.&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt; selectionSaveInto: {
      local!selection,
      /*This save adds the full rows of data for items*/
      /*selected in the most recent user interaction*/
      /*to local!selectedCourse. */
      a!save(
        local!selectedCourse,
       fv!selectedRows
      ),
      /*This save removes the full rows of data for */
      /*items deselected in the most recent user*/
      /*interaction to local!selectedCourse. */
     
      a!save(
        ri!selectedCourse,
        local!selectedCourse
      ),
      
      
    },
    validations: if(
      count(
        local!selection
      ) &amp;gt; 1,
      &amp;quot;PLEASE SELECT A SINGLE COURSE VALUE FOR UPDATE.&amp;quot;,
      null
    )&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: issue with read only grid selection</title><link>https://community.appian.com/thread/76141?ContentTypeID=1</link><pubDate>Wed, 26 Aug 2020 07:36:59 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:a27a59c0-8660-4a24-9484-dbe0a629b295</guid><dc:creator>Stefan Helzle</dc:creator><description>&lt;p&gt;Did you try to modify the saveInto of the grid as I suggested? I think relying on append() and difference() for just storing the last selected item is a bit of an overkill.&lt;/p&gt;
&lt;p&gt;But my analysis could be completely wrong.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: issue with read only grid selection</title><link>https://community.appian.com/thread/76140?ContentTypeID=1</link><pubDate>Wed, 26 Aug 2020 07:00:42 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:e26009e9-c663-4c5d-8105-9cff337a0be6</guid><dc:creator>Shikha</dc:creator><description>&lt;p&gt;Hi Stefan ,&lt;/p&gt;
&lt;p&gt;The scenario is like that a user can only select a single row for modification . User selects a row, click on modify button , an interface pops up with the grid values. The grid values comes from a View. So via query entity, I am fetching the ID from the view and Passing that ID to get the data from the table . So if user modifies any text fields within the modify interface, the values are updated in the source table as well as the grid data is updated.&lt;/p&gt;
&lt;p&gt;Moreover I noticed, the RI selected course doesn&amp;#39;t get updated after I modify any grid data.Initially while selecting grid , RI holds the data fine. This is the save into code of the modify i/f if that helps. Local!modifyCouseData holds the new updated values which user enters. The values are getting saved in course table.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;    a!buttonWidget(
                label: &amp;quot;Save&amp;quot;,
                value: local!buttonAction,
                saveInto: {
                  a!save(
                    local!modifyCourseData.updatedOn,
                    now()
                  ),
                  a!save(
                    local!modifyCourseData.updatedBy,
                    loggedInUser()
                  ),
                  a!writeToDataStoreEntity(
                    dataStoreEntity: cons!PLC_DSE_COURSE,
                    valueToStore: local!modifyCourseData
                  ),
               
                  a!save(
                    local!modifyCourseData,
                    null
                  ),
                  a!save(
                    ri!buttonAction,
                    null
                  ),
                  
                  
                },
                style: &amp;quot;PRIMARY&amp;quot;,
                validate: true(),
                
              ),&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: issue with read only grid selection</title><link>https://community.appian.com/thread/76139?ContentTypeID=1</link><pubDate>Wed, 26 Aug 2020 06:29:51 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:fd01f78a-a635-4bd1-80b7-1c46f2cae3b6</guid><dc:creator>Stefan Helzle</dc:creator><description>&lt;p&gt;How do you implement the modification feature. In case you use the local!selectedCourse, then I think the issue is that fv!deselectedRows is not the same value anymore as local!selectedCourse because you modified it. Because of this, line 22 does not work anymore and does not remove the deselected item from the list.&lt;/p&gt;
&lt;p&gt;Does this make sense?&lt;/p&gt;
&lt;p&gt;I assume that your intention is, to only allow a single item to be selected. Then you might not need this complex saveInto anymore, but could just store the last item in fv!selectedRows into local!selectedCourse and/or ri!selectedCourse.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: issue with read only grid selection</title><link>https://community.appian.com/thread/76138?ContentTypeID=1</link><pubDate>Tue, 25 Aug 2020 17:52:40 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:7668e425-3778-4d82-9ddd-fd7aa952ae30</guid><dc:creator>Shikha</dc:creator><description>&lt;p&gt;Hi Mike,&lt;/p&gt;
&lt;p&gt;Grid selection works fine in the child interface. In the parent I/f its creating a problem, only if I modify any grid row values. The RI does not gets null if i Deselect the earlier selected row after modifying the data.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt; pagingSaveInto: local!pagingInfo,
    selectable: true(),
    selectionStyle: &amp;quot;ROW_HIGHLIGHT&amp;quot;,
    selectionValue: local!selection,
    selectionSaveInto: {
      local!selection,
      /*This save adds the full rows of data for items*/
      /*selected in the most recent user interaction*/
      /*to local!selectedCourse. */
      a!save(
        local!selectedCourse,
        append(
          local!selectedCourse,
          fv!selectedRows
        )
      ),
      /*This save removes the full rows of data for */
      /*items deselected in the most recent user*/
      /*interaction to local!selectedCourse. */
      a!save(
        local!selectedCourse,
        difference(
          local!selectedCourse,
          fv!deselectedRows
        )
      ),
      a!save(
        ri!selectedCourse,
        local!selectedCourse
      ),
      
      
    },&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: issue with read only grid selection</title><link>https://community.appian.com/thread/76135?ContentTypeID=1</link><pubDate>Tue, 25 Aug 2020 17:06:06 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:c761c59e-ec9b-45f7-b917-2ffcbc0ad970</guid><dc:creator>Mike Schmitt</dc:creator><description>&lt;p&gt;Can you post a code snippet of your selection save into?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>