<?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</title><link>https://community.appian.com/discussions/f/user-interface/15023/editable-grid</link><description>Hi 
 I have a editable grid where I am showing list of users with edit and delete icon. We don&amp;#39;t want inline editing. Hence when person click on edit icon another interface appear where text box, dropdown, and checkboxes needs to pre-filled and selected</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: editable grid</title><link>https://community.appian.com/thread/67337?ContentTypeID=1</link><pubDate>Fri, 14 Jun 2019 07:51:40 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:14034c24-2a5e-4756-adaf-fea6e63ad80e</guid><dc:creator>husaina0001</dc:creator><description>&lt;p&gt;Thanks all for your help. This problem is solved now. Instead of using load()&amp;nbsp; I replaced it with&amp;nbsp;a!localVariables(). This will update local variables every time when OR_addUpdateUser interface called.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: editable grid</title><link>https://community.appian.com/thread/67257?ContentTypeID=1</link><pubDate>Wed, 12 Jun 2019 11:41:53 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:44e25ac3-91d0-4694-9a44-d63112802d61</guid><dc:creator>husaina0001</dc:creator><description>&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;= load(
  local!existingUserPropertyMappingInfo: if(
    isnull(
      ri!userId
    ),
    {},
    a!queryEntity(
      entity: cons!OR_USER_PROPERTY_INFO,
      query: a!query(
        filter: a!queryFilter(
          field: &amp;quot;user_id&amp;quot;,
          operator: &amp;quot;=&amp;quot;,
          value: ri!userId
        ),
        pagingInfo: a!pagingInfo(
          startIndex: 1,
          batchSize: - 1
        )
      )
    ).data
  ),
  local!existingUserPropertyIds: {
    a!forEach(
      items: local!existingUserPropertyMappingInfo,
      expression: fv!item.property_id
    )
  },
  local!gridSelection: a!gridSelection(
    selected: local!existingUserPropertyIds,
    pagingInfo: a!pagingInfo(
      startIndex: 1,
      batchSize: - 1,
      sort: a!sortInfo(
        field: &amp;quot;property_name&amp;quot;,
        ascending: true
      )
    )
  ),
  local!properties: a!queryEntity(
    entity: cons!OR_PROPERTY_INFO,
    query: a!query(
      pagingInfo: local!gridSelection.pagingInfo
    ),
    fetchTotalCount: true
  ),
  a!sectionLayout(
    contents: {
      with(
        local!userDetails: if(
          isnull(
            ri!userId
          ),
          null,
          a!queryEntity(
            entity: cons!OR_USER,
            query: a!query(
              filter: a!queryFilter(
                field: &amp;quot;user_id&amp;quot;,
                operator: &amp;quot;=&amp;quot;,
                value: ri!userId
              ),
              pagingInfo: a!pagingInfo(
                startIndex: 1,
                batchSize: - 1
              )
            )
          ).data
        ),
        a!boxLayout(
          label: &amp;quot;ADD NEW USER&amp;quot;,
          contents: {
            a!columnsLayout(
              columns: {
                a!columnLayout(
                  contents: {
                    a!textField(
                      label: &amp;quot;First Name&amp;quot;,
                      labelPosition: &amp;quot;ABOVE&amp;quot;,
                      placeholder: &amp;quot;First name&amp;quot;,
                      value: if(
                        isnull(
                          local!userDetails
                        ),
                        ri!userDetails.first_name,
                        local!userDetails.first_name
                      ),
                      saveInto: ri!userDetails.first_name,
                      refreshAfter: &amp;quot;UNFOCUS&amp;quot;,
                      required: true,
                      requiredmessage: &amp;quot;Please enter first name&amp;quot;,
                      validations: {}
                    )
                  }
                ),
                a!columnLayout(
                  contents: {
                    a!textField(
                      label: &amp;quot;Last Name&amp;quot;,
                      labelPosition: &amp;quot;ABOVE&amp;quot;,
                      placeholder: &amp;quot;Last name&amp;quot;,
                      value: if(
                        isnull(
                          local!userDetails
                        ),
                        ri!userDetails.last_name,
                        local!userDetails.last_name
                      ),
                      saveInto: ri!userDetails.last_name,
                      refreshAfter: &amp;quot;UNFOCUS&amp;quot;,
                      required: true,
                      requiredmessage: &amp;quot;Please enter last name&amp;quot;,
                      validations: {}
                    )
                  }
                )
              }
            ),
            a!columnsLayout(
              columns: {
                a!columnLayout(
                  contents: {
                    a!textField(
                      label: &amp;quot;Email&amp;quot;,
                      labelPosition: &amp;quot;ABOVE&amp;quot;,
                      placeholder: &amp;quot;Email&amp;quot;,
                      value: if(
                        isnull(
                          local!userDetails
                        ),
                        ri!userDetails.primary_email,
                        local!userDetails.primary_email
                      ),
                      saveInto: ri!userDetails.primary_email,
                      refreshAfter: &amp;quot;UNFOCUS&amp;quot;,
                      required: true,
                      requiredmessage: &amp;quot;Please enter email&amp;quot;,
                      validations: {}
                    )
                  }
                ),
                a!columnLayout(
                  contents: {
                    a!dropdownField(
                      label: &amp;quot;Role&amp;quot;,
                      labelPosition: &amp;quot;ABOVE&amp;quot;,
                      placeholderLabel: &amp;quot;--- Select a Role ---&amp;quot;,
                      choiceLabels: {
                        &amp;quot;Owner&amp;quot;,
                        &amp;quot;Manager&amp;quot;,
                        &amp;quot;Resident&amp;quot;
                      },
                      choiceValues: {
                        cons!OWNER_ROLE_ID,
                        cons!MANAGER_ROLE_ID,
                        cons!RESIDENT_ROLE_ID
                      },
                      value: if(
                        isnull(
                          local!userDetails
                        ),
                        ri!userDetails.role_id,
                        local!userDetails.role_id
                      ),
                      saveInto: ri!userDetails.role_id,
                      required: true,
                      requiredmessage: &amp;quot;Please select role&amp;quot;,
                      validations: {}
                    )
                  }
                )
              }
            )
          },
          style: &amp;quot;STANDARD&amp;quot;,
          marginBelow: &amp;quot;STANDARD&amp;quot;
        )
      ),
      a!columnsLayout(
        columns: {
          a!columnLayout(
            contents: {
              a!richTextDisplayField(
                label: &amp;quot;&amp;quot;,
                labelPosition: &amp;quot;COLLAPSED&amp;quot;,
                value: {
                  a!richTextHeader(
                    text: &amp;quot;Select Properties&amp;quot;
                  )
                }
              ),
              a!gridField(
                label: &amp;quot;Select Properties&amp;quot; &amp;amp; local!gridSelection,
                labelPosition: &amp;quot;COLLAPSED&amp;quot;,
                totalCount: local!properties.totalCount,
                columns: {
                  a!gridTextColumn(
                    label: &amp;quot;Property Name&amp;quot;,
                    field: &amp;quot;property_name&amp;quot;,
                    data: index(
                      local!properties.data,
                      &amp;quot;property_name&amp;quot;,
                      {}
                    )
                  ),
                  a!gridTextColumn(
                    label: &amp;quot;Address&amp;quot;,
                    field: &amp;quot;address_line1&amp;quot;,
                    data: index(
                      local!properties.data,
                      &amp;quot;address_line1&amp;quot;,
                      {}
                    )
                  )
                },
                identifiers: local!properties.identifiers,
                value: local!gridSelection,
                saveInto: {
                  local!gridSelection,
                  a!save(
                    ri!userPropertyInfo,
                    a!forEach(
                      items: local!gridSelection.selected,
                      expression: {
                        property_id: fv!item,
                        is_active: 1,
                        user_property_status: 1
                      }
                    )
                  )
                },
                selection: true,
                selectionStyle: &amp;quot;CHECKBOX&amp;quot;,
                shadeAlternateRows: true,
                rowHeader: 1
              ),
              a!textField(
                label: &amp;quot;Selected Property IDs&amp;quot;,
                value: if(
                  length(
                    local!gridSelection.selected
                  ) = 0,
                  &amp;quot;No Property selected&amp;quot;,
                  joinarray(
                    local!gridSelection.selected,
                    &amp;quot;, &amp;quot;
                  )
                ),
                readOnly: true
              )
            }
          )
        }
      ),
      a!columnsLayout(
        columns: {
          a!columnLayout(
            contents: {
              a!buttonArrayLayout(
                buttons: {
                  a!buttonWidget(
                    label: &amp;quot;Cancel&amp;quot;,
                    style: &amp;quot;NORMAL&amp;quot;,
                    saveInto: {
                      a!save(
                        target: ri!actionEvent,
                        value: &amp;quot;listUsers&amp;quot;
                      ),
                      a!save(
                        target: ri!userId,
                        value: null
                      )                    
                    }
                  ),
                  a!buttonWidget(
                    label: &amp;quot;Save&amp;quot;,
                    submit: true,
                    style: &amp;quot;PRIMARY&amp;quot;,
                    disabled: false
                  )
                },
                align: &amp;quot;END&amp;quot;
              )
            }
          )
        }
      )
    }
  )
)&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: editable grid</title><link>https://community.appian.com/thread/67256?ContentTypeID=1</link><pubDate>Wed, 12 Jun 2019 11:23:30 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:7089005a-ffe5-4baa-a184-98cace85dc9d</guid><dc:creator>husaina0001</dc:creator><description>&lt;p&gt;Submission happens at &lt;span&gt;OR_addUpdateUser&lt;/span&gt;. There are two interfaces&amp;nbsp;&lt;/p&gt;
&lt;p&gt;1. OR_userManagement&lt;/p&gt;
&lt;p&gt;2. OR_addUpdateUser&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Under OR_userManagement&amp;nbsp; I am calling OR_addUpdateUser by clicking edit icon using following code:&lt;/p&gt;
&lt;p&gt;rule!OR_addUpdateUser(&lt;br /&gt; userDetails: ri!userDetails,&lt;br /&gt; userPropertyInfo: ri!userPropertyInfo,&lt;br /&gt; userId: ri!userId,&lt;br /&gt; actionEvent: ri!actionEvent&lt;br /&gt; )&lt;/p&gt;
&lt;p&gt;So when OR_addUpdateUser calls we are hiding &lt;span&gt;OR_userManagement contents temporary and display existing user details.So when the person click on edit icon it would display existing user&amp;#39;s and its associate properties (multiple) information. Multiple properties are displayed in editable grid with checkbox selection. In edit mode checkboxes are checked based on property associate with user.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&amp;nbsp;&lt;/span&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</title><link>https://community.appian.com/thread/67255?ContentTypeID=1</link><pubDate>Wed, 12 Jun 2019 11:21:48 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:2a32af88-bc1f-43d2-b6e2-71635fd1c4ca</guid><dc:creator>viveku3486</dc:creator><description>&lt;p&gt;Can it be possible for you to send the code of&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;rule!OR_addUpdateUser() ?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: editable grid</title><link>https://community.appian.com/thread/67252?ContentTypeID=1</link><pubDate>Wed, 12 Jun 2019 10:56:25 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:7cc922ef-5be1-4367-b742-9b201469b72c</guid><dc:creator>husaina0001</dc:creator><description>&lt;p&gt;Yes I am queriying based on userid. And userId is filled with appropriate value alos&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: editable grid</title><link>https://community.appian.com/thread/67207?ContentTypeID=1</link><pubDate>Tue, 11 Jun 2019 13:19:28 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:5bca0735-70a6-4930-93ed-37688d303ea2</guid><dc:creator>viveku3486</dc:creator><description>&lt;p&gt;Hello Hussain,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;How you are taking data that is being displayed on the click of edit button? I can see that you are saving userId when user clicks on edit button. Are you querying again based on this user id to get respective details? Have you checked the userId variable value? Is it taking the correct number?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: editable grid</title><link>https://community.appian.com/thread/67205?ContentTypeID=1</link><pubDate>Tue, 11 Jun 2019 12:22:42 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:48258c76-00e9-4010-b92e-6460000a4d12</guid><dc:creator>Stewart Burchell</dc:creator><description>&lt;p&gt;It&amp;#39;s a little difficult to tell from what you&amp;#39;ve provided what the pattern is you&amp;#39;re aiming for. If you&amp;#39;re aiming to accumulate the changes in the interface and then&amp;nbsp;commit&amp;nbsp; those changes to the database in a process (as is suggested by the fact that you have rule inputs, but counter-suggested by the fact that your screen shot contains no &amp;#39;Submit&amp;#39; button) OR you want to apply any changes made immediately (for which you have no apparent functionality in the interface to do this e.g. no a!writeToDatstore() function). Can you clarify what the pattern is you&amp;#39;re aiming at and then perhaps we can explore options to fulfil this.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>