<?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 implement two grid with functionality select some item from grid 1 and click add button to put all that item to grid 2.</title><link>https://community.appian.com/discussions/f/user-interface/28410/how-to-implement-two-grid-with-functionality-select-some-item-from-grid-1-and-click-add-button-to-put-all-that-item-to-grid-2</link><description>I want to make UI where two grid will be shown grid 1 will have all data and grid 2 will be initially empty. In grid 1 we have checkbox where we can select different row and when we click add button then all selected items will be transferred to the second</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: How to implement two grid with functionality select some item from grid 1 and click add button to put all that item to grid 2.</title><link>https://community.appian.com/thread/111212?ContentTypeID=1</link><pubDate>Tue, 18 Apr 2023 05:42:08 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:f5710610-e53b-45df-bf6b-a39cd1a7928d</guid><dc:creator>Sushil</dc:creator><description>&lt;p&gt;It&amp;#39;s really helpful. Thank you so much.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to implement two grid with functionality select some item from grid 1 and click add button to put all that item to grid 2.</title><link>https://community.appian.com/thread/111211?ContentTypeID=1</link><pubDate>Tue, 18 Apr 2023 05:38:37 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:4520e3c3-d257-43ef-ac8f-f35c7fe37098</guid><dc:creator>aryan</dc:creator><description>&lt;p&gt;Just an example of how you can implement the dual picklist pattern in terms of grids.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;a!localVariables(
  local!availableList: {
    a!map(id: 11, name: &amp;quot;Item 1&amp;quot;),
    a!map(id: 21, name: &amp;quot;Item 2&amp;quot;),
    a!map(id: 31, name: &amp;quot;Item 3&amp;quot;),
    a!map(id: 51, name: &amp;quot;Item 5&amp;quot;),
    a!map(id: 61, name: &amp;quot;Item 6&amp;quot;)
  },
  local!selectedList: {},
  local!availableListChoices: {},
  local!selectedListChoices: {},
  {
    a!sectionLayout(
      label: &amp;quot;Items&amp;quot;,
      labelSize: &amp;quot;SMALL&amp;quot;,
      labelColor: &amp;quot;SECONDARY&amp;quot;,
      contents: {
        a!columnsLayout(
          columns: {
            a!columnLayout(
              contents: {
                a!richTextDisplayField(
                  labelPosition: &amp;quot;COLLAPSED&amp;quot;,
                  value: {
                    &amp;quot;Available&amp;quot;,
                    &amp;quot; &amp;quot;,
                    a!richTextItem(
                      text: &amp;quot;(&amp;quot; &amp;amp; length(local!availableList) &amp;amp; &amp;quot;)&amp;quot;,
                      style: &amp;quot;STRONG&amp;quot;
                    )
                  }
                ),
                a!cardLayout(
                  contents: {
                    a!gridField(
                      data: local!availableList,
                      columns: {
                        a!gridColumn(
                          label: &amp;quot;Items&amp;quot;,
                          value: fv!row.name,
                          sortField: fv!currentPage
                        )
                      },
                      selectable: true,
                      selectionSaveInto: {
                        a!save(
                          local!availableListChoices,
                          if(
                            a!isNotNullOrEmpty(save!value),
                            index(
                              index(
                                local!availableList,
                                save!value,
                                null()
                              ),
                              &amp;quot;id&amp;quot;,
                              null()
                            ),
                            null()
                          )
                        )
                      },
                      selectionValue: wherecontains(
                        tointeger(local!availableListChoices),
                        index(local!availableList, &amp;quot;id&amp;quot;, tointeger(null()))
                      )
                    )
                  },
                  height: &amp;quot;TALL&amp;quot;,
                  marginBelow: &amp;quot;STANDARD&amp;quot;
                )
              },
              width: &amp;quot;MEDIUM&amp;quot;
            ),
            a!columnLayout(
              contents: {
                a!buttonArrayLayout(
                  buttons: {
                    a!buttonWidget(
                      label: &amp;quot;Add Selected&amp;quot;,
                      icon: if(
                        a!isPageWidth(&amp;quot;PHONE&amp;quot;),
                        &amp;quot;chevron-down&amp;quot;,
                        &amp;quot;chevron-right&amp;quot;
                      ),
                      saveInto: {
                        /* Add chosen available items to selected list */
                        a!save(
                          target: local!selectedList,
                          value: cast(
                            typeof(local!selectedList),
                            todatasubset(
                              arrayToPage: append(
                                local!selectedList,
                                index(
                                  local!availableList,
                                  wherecontains(
                                    local!availableListChoices,
                                    local!availableList.id
                                  ),
                                  {}
                                )
                              ),
                              pagingConfiguration: a!pagingInfo(
                                startIndex: 1,
                                batchSize: - 1,
                                sort: a!sortInfo(field: &amp;quot;id&amp;quot;, ascending: true)
                              )
                            ).data
                          )
                        ),
                        /* Remove from available list */
                        a!save(
                          local!availableList,
                          remove(
                            local!availableList,
                            wherecontains(
                              local!availableListChoices,
                              local!availableList.id
                            )
                          )
                        ),
                        /* Clear out choices */
                        a!save(local!availableListChoices, null)
                      },
                      width: &amp;quot;FILL&amp;quot;,
                      style: &amp;quot;SECONDARY&amp;quot;,
                      disabled: or(
                        a!isNullOrEmpty(local!availableListChoices),
                        length(local!availableList) = 0
                      )
                    ),
                    a!buttonWidget(
                      label: &amp;quot;Add All&amp;quot;,
                      icon: &amp;quot;plus&amp;quot;,
                      saveInto: {
                        /* Add all available items to selected list */
                        a!save(
                          target: local!selectedList,
                          value: cast(
                            typeof(local!selectedList),
                            todatasubset(
                              arrayToPage: append(local!selectedList, local!availableList),
                              pagingConfiguration: a!pagingInfo(
                                startIndex: 1,
                                batchSize: - 1,
                                sort: a!sortInfo(field: &amp;quot;id&amp;quot;, ascending: true)
                              )
                            ).data
                          )
                        ),
                        /* Clear available list */
                        a!save(local!availableList, {}),
                        /* Clear out choices */
                        a!save(local!availableListChoices, null)
                      },
                      width: &amp;quot;FILL&amp;quot;,
                      style: &amp;quot;SECONDARY&amp;quot;,
                      disabled: length(local!availableList) = 0
                    )
                  },
                  align: &amp;quot;START&amp;quot;,
                  marginBelow: &amp;quot;EVEN_MORE&amp;quot;
                ),
                a!buttonArrayLayout(
                  buttons: {
                    a!buttonWidget(
                      label: &amp;quot;Remove Selected&amp;quot;,
                      icon: if(
                        a!isPageWidth(&amp;quot;PHONE&amp;quot;),
                        &amp;quot;chevron-up&amp;quot;,
                        &amp;quot;chevron-left&amp;quot;
                      ),
                      saveInto: {
                        /* Add chosen selected items to available list */
                        a!save(
                          target: local!availableList,
                          value: cast(
                            typeof(local!availableList),
                            todatasubset(
                              arrayToPage: append(
                                local!availableList,
                                index(
                                  local!selectedList,
                                  wherecontains(
                                    local!selectedListChoices,
                                    local!selectedList.id
                                  ),
                                  {}
                                )
                              ),
                              pagingConfiguration: a!pagingInfo(
                                startIndex: 1,
                                batchSize: - 1,
                                sort: a!sortInfo(field: &amp;quot;id&amp;quot;, ascending: true)
                              )
                            ).data
                          )
                        ),
                        /* Remove from selected list */
                        a!save(
                          local!selectedList,
                          remove(
                            local!selectedList,
                            wherecontains(
                              local!selectedListChoices,
                              local!selectedList.id
                            )
                          )
                        ),
                        /* Clear out choices */
                        a!save(local!selectedListChoices, null)
                      },
                      width: &amp;quot;FILL&amp;quot;,
                      style: &amp;quot;SECONDARY&amp;quot;,
                      disabled: or(
                        a!isNullOrEmpty(local!selectedListChoices),
                        length(local!selectedList) = 0
                      )
                    ),
                    a!buttonWidget(
                      label: &amp;quot;Remove All&amp;quot;,
                      icon: &amp;quot;times&amp;quot;,
                      saveInto: {
                        /* Add all selected items to available list */
                        a!save(
                          target: local!availableList,
                          value: cast(
                            typeof(local!availableList),
                            todatasubset(
                              arrayToPage: append(local!availableList, local!selectedList),
                              pagingConfiguration: a!pagingInfo(
                                startIndex: 1,
                                batchSize: - 1,
                                sort: a!sortInfo(field: &amp;quot;id&amp;quot;, ascending: true)
                              )
                            ).data
                          )
                        ),
                        /* Clear selected list */
                        a!save(local!selectedList, {}),
                        /* Clear out choices */
                        a!save(local!selectedListChoices, null)
                      },
                      width: &amp;quot;FILL&amp;quot;,
                      style: &amp;quot;SECONDARY&amp;quot;,
                      disabled: length(local!selectedList) = 0
                    )
                  },
                  align: &amp;quot;START&amp;quot;
                )
              },
              width: &amp;quot;NARROW&amp;quot;
            ),
            a!columnLayout(
              contents: {
                a!richTextDisplayField(
                  labelPosition: &amp;quot;COLLAPSED&amp;quot;,
                  value: {
                    &amp;quot;Selected&amp;quot;,
                    &amp;quot; &amp;quot;,
                    a!richTextItem(
                      text: &amp;quot;(&amp;quot; &amp;amp; length(local!selectedList) &amp;amp; &amp;quot;)&amp;quot;,
                      style: &amp;quot;STRONG&amp;quot;
                    )
                  }
                ),
                a!cardLayout(
                  contents: {
                    a!gridField(
                      data: local!selectedList,
                      columns: {
                        a!gridColumn(
                          label: &amp;quot;Items&amp;quot;,
                          value: fv!row.name,
                          sortField: fv!currentPage
                        )
                      },
                      selectable: true,
                      selectionSaveInto: {
                        a!save(
                          local!selectedListChoices,
                          if(
                            a!isNotNullOrEmpty(save!value),
                            index(
                              index(
                                local!selectedList,
                                save!value,
                                null()
                              ),
                              &amp;quot;id&amp;quot;,
                              null()
                            ),
                            null()
                          )
                        )
                      },
                      selectionValue: wherecontains(
                        tointeger(local!selectedListChoices),
                        index(local!selectedList, &amp;quot;id&amp;quot;, tointeger(null()))
                      )
                    )
                  },
                  height: &amp;quot;TALL&amp;quot;,
                  marginBelow: &amp;quot;STANDARD&amp;quot;
                )
              },
              width: &amp;quot;MEDIUM&amp;quot;
            ),
            a!columnLayout(contents: {})
          },
          alignVertical: &amp;quot;MIDDLE&amp;quot;
        )
      }
    )
  }
)&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to implement two grid with functionality select some item from grid 1 and click add button to put all that item to grid 2.</title><link>https://community.appian.com/thread/111209?ContentTypeID=1</link><pubDate>Tue, 18 Apr 2023 05:25:28 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:98ba8fff-8587-46fe-af81-e6b9a83d995f</guid><dc:creator>Amaan Shekh</dc:creator><description>&lt;p&gt;you can take references from this Interface pattern&amp;nbsp;&lt;a href="https://docs.appian.com/suite/help/23.1/dual-picklist-pattern.html"&gt;Dual pickList&lt;/a&gt;.&lt;br /&gt;&lt;img src="/resized-image/__size/320x240/__key/communityserver-discussions-components-files/13/pastedimage1681795654603v1.png" alt=" " /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to implement two grid with functionality select some item from grid 1 and click add button to put all that item to grid 2.</title><link>https://community.appian.com/thread/111208?ContentTypeID=1</link><pubDate>Tue, 18 Apr 2023 05:25:23 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:5cb17c98-6640-4e8c-b687-87a9979e9ab0</guid><dc:creator>sanchitg0002</dc:creator><description>&lt;p&gt;There is a pattern waiting for you in Interface designer called &amp;quot;Dual Picklist&amp;quot;.&lt;/p&gt;
&lt;p&gt;&lt;img height="94" src="/resized-image/__size/320x240/__key/communityserver-discussions-components-files/13/pastedimage1681795579915v1.png" width="245" alt=" " /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>