<?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>Setting up a Paging Grid Selection Component to display selected text in a text field on an interface</title><link>https://community.appian.com/discussions/f/user-interface/13467/setting-up-a-paging-grid-selection-component-to-display-selected-text-in-a-text-field-on-an-interface</link><description>Hi All, 
 I am trying to configure a Paging Grid Selection Component (see definition code below). The grid will show a number of CDTs - comments coming from different approvers in a long running process. However, when a user clicks on a row in the grid</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Setting up a Paging Grid Selection Component to display selected text in a text field on an interface</title><link>https://community.appian.com/thread/61205?ContentTypeID=1</link><pubDate>Fri, 05 Oct 2018 02:49:50 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:5dca2d2d-29b6-42c9-aa09-08791736ff27</guid><dc:creator>Siva</dc:creator><description>&lt;p&gt;Hi Susan,&lt;/p&gt;
&lt;p&gt;Below are the some of the best practices while Passing data to Grid.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;1) Avoid dot notation to the Data Subset&amp;nbsp; ,instead use indexing with default null.&lt;/p&gt;
&lt;p&gt;2) Always Pass the paging Info with limited batch size&lt;/p&gt;
&lt;p&gt;3)&amp;nbsp;Query Entity&amp;nbsp;should be optimized with the filters and if possible try to take the data out of data-subset and pass to another local variable and use it for grid data.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Thanks&lt;/p&gt;
&lt;p&gt;&lt;span style="color:#33cccc;"&gt;Siva Chimata&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Setting up a Paging Grid Selection Component to display selected text in a text field on an interface</title><link>https://community.appian.com/thread/61086?ContentTypeID=1</link><pubDate>Wed, 03 Oct 2018 15:15:32 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:b33a33bc-81b1-4e5c-87e7-6560c5077558</guid><dc:creator>charlesm492</dc:creator><description>No problem!  Generally, if the data is ever expected to be null such as in this case where it&amp;#39;s null before the user makes a selection, the index() function is safer to use than dot notation since it returns the third parameter in the case of an invalid index.&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Setting up a Paging Grid Selection Component to display selected text in a text field on an interface</title><link>https://community.appian.com/thread/61083?ContentTypeID=1</link><pubDate>Wed, 03 Oct 2018 15:07:20 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:ae0232f8-7521-4d2a-899c-e1bf40454d24</guid><dc:creator>susana197</dc:creator><description>Thanks Charles.  That took care of it.&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Setting up a Paging Grid Selection Component to display selected text in a text field on an interface</title><link>https://community.appian.com/thread/61081?ContentTypeID=1</link><pubDate>Wed, 03 Oct 2018 14:57:24 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:2bcaeff2-93b2-430f-b05d-246bcfc1c0c9</guid><dc:creator>charlesm492</dc:creator><description>Try replacing the local!datasubset.data.comment with index(local!datasubset.data, &amp;quot;comment&amp;quot;, null).&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Setting up a Paging Grid Selection Component to display selected text in a text field on an interface</title><link>https://community.appian.com/thread/61080?ContentTypeID=1</link><pubDate>Wed, 03 Oct 2018 14:52:32 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:cd53bc19-95c7-4f42-9fef-a1156f7a515e</guid><dc:creator>susana197</dc:creator><description>Could not display interface. Please check definition and inputs.&lt;br /&gt;
Interface Definition: Expression evaluation error at function &amp;#39;index&amp;#39; parameter 2 [line 58]: Invalid index: Cannot index property &amp;#39;comment&amp;#39; of type Text into type List of Variant&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Setting up a Paging Grid Selection Component to display selected text in a text field on an interface</title><link>https://community.appian.com/thread/61078?ContentTypeID=1</link><pubDate>Wed, 03 Oct 2018 14:45:35 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:1e6253f9-cb0d-49a9-a074-0dbcbb149e65</guid><dc:creator>charlesm492</dc:creator><description>What is the error you are getting?&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Setting up a Paging Grid Selection Component to display selected text in a text field on an interface</title><link>https://community.appian.com/thread/61063?ContentTypeID=1</link><pubDate>Wed, 03 Oct 2018 13:46:15 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:ca17fa4f-853e-4363-9466-6b1e8f8d0600</guid><dc:creator>susana197</dc:creator><description>Please is there a way to check that there is at least one row in the dataset?  Right now, when the dataset returns 0 rows, the interface breaks with an error.&lt;br /&gt;
Here before is the full interface code:&lt;br /&gt;
&lt;br /&gt;
=load(&lt;br /&gt;
  /* Set the default paging and sorting config */&lt;br /&gt;
  local!gridSelection: a!gridSelection(&lt;br /&gt;
    selected: {},&lt;br /&gt;
    pagingInfo: a!pagingInfo(&lt;br /&gt;
      startIndex: 1,&lt;br /&gt;
      batchSize: 10,&lt;br /&gt;
      sort: a!sortInfo(&lt;br /&gt;
        field: &amp;quot;timeStamp&amp;quot;,&lt;br /&gt;
        ascending: true&lt;br /&gt;
      )&lt;br /&gt;
    )&lt;br /&gt;
  ),&lt;br /&gt;
  with(&lt;br /&gt;
    local!datasubset: a!queryEntity(&lt;br /&gt;
      entity:cons!CSHV_COMMENT_CDT,&lt;br /&gt;
      query:a!query(&lt;br /&gt;
        selection: a!querySelection(columns: {&lt;br /&gt;
          a!queryColumn(field: &amp;quot;author&amp;quot;),&lt;br /&gt;
          a!queryColumn(field: &amp;quot;status&amp;quot;),&lt;br /&gt;
          a!queryColumn(field: &amp;quot;timeStamp&amp;quot;),&lt;br /&gt;
          a!queryColumn(field: &amp;quot;comment&amp;quot;)&lt;br /&gt;
        }),&lt;br /&gt;
      filter: a!queryFilter(&lt;br /&gt;
    	field: &amp;quot;cashAdvanceId.id&amp;quot;,&lt;br /&gt;
    	operator: &amp;quot;=&amp;quot;,&lt;br /&gt;
    	value: ri!cashAdvanceData.id&lt;br /&gt;
      ),&lt;br /&gt;
        pagingInfo: local!gridSelection.pagingInfo&lt;br /&gt;
      )&lt;br /&gt;
    ),&lt;br /&gt;
    a!sectionLayout(&lt;br /&gt;
      contents: {&lt;br /&gt;
        a!gridField(&lt;br /&gt;
          label: &amp;quot;Example: Employee Grid Selection&amp;quot;,&lt;br /&gt;
          totalCount: local!datasubset.totalCount,&lt;br /&gt;
          columns: {&lt;br /&gt;
            a!gridTextColumn(label: &amp;quot;Commenter&amp;quot;, field: &amp;quot;author&amp;quot;, data: index(local!datasubset.data, &amp;quot;author&amp;quot; , {})),&lt;br /&gt;
            a!gridTextColumn(label: &amp;quot;Status&amp;quot;,  field: &amp;quot;status&amp;quot;,  data: index(local!datasubset.data, &amp;quot;status&amp;quot; , {})),&lt;br /&gt;
            a!gridTextColumn(label: &amp;quot;Date &amp;amp; Time&amp;quot;, field: &amp;quot;timeStamp&amp;quot;, data: index(local!datasubset.data, &amp;quot;timeStamp&amp;quot; , {})),&lt;br /&gt;
            a!gridTextColumn(label: &amp;quot;Comment&amp;quot;, field: &amp;quot;comment&amp;quot;, data: left(index(local!datasubset.data, &amp;quot;comment&amp;quot; , {}), 40))&lt;br /&gt;
          },&lt;br /&gt;
          identifiers: local!datasubset.identifiers,&lt;br /&gt;
          value: local!gridSelection,&lt;br /&gt;
          saveInto: {&lt;br /&gt;
            local!gridSelection&lt;br /&gt;
          },&lt;br /&gt;
          selection: true&lt;br /&gt;
        ),&lt;br /&gt;
&lt;br /&gt;
        a!textField(&lt;br /&gt;
           label: &amp;quot;&amp;quot;,&lt;br /&gt;
           readOnly: true,&lt;br /&gt;
           value: if(&lt;br /&gt;
             length(&lt;br /&gt;
             local!gridSelection.selected&lt;br /&gt;
             ) &amp;lt;&amp;gt; 1, &lt;br /&gt;
             &amp;quot;No comment row selected&amp;quot;,&lt;br /&gt;
             index(&lt;br /&gt;
               local!datasubset.data.comment,&lt;br /&gt;
               wherecontains(&lt;br /&gt;
                 local!gridSelection.selected,&lt;br /&gt;
                 local!datasubset.identifiers&lt;br /&gt;
               )&lt;br /&gt;
             )&lt;br /&gt;
           )&lt;br /&gt;
         )&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
        &lt;br /&gt;
        &lt;br /&gt;
        &lt;br /&gt;
        &lt;br /&gt;
      }&lt;br /&gt;
    )&lt;br /&gt;
  )&lt;br /&gt;
)&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Setting up a Paging Grid Selection Component to display selected text in a text field on an interface</title><link>https://community.appian.com/thread/61057?ContentTypeID=1</link><pubDate>Wed, 03 Oct 2018 13:13:21 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:4eed3813-4f90-438a-a9df-ba9d5b6b3588</guid><dc:creator>susana197</dc:creator><description>THANKS.&lt;br /&gt;
&lt;br /&gt;
This has worked now.&lt;br /&gt;
&lt;br /&gt;
Have a nice day.&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Setting up a Paging Grid Selection Component to display selected text in a text field on an interface</title><link>https://community.appian.com/thread/61056?ContentTypeID=1</link><pubDate>Wed, 03 Oct 2018 13:09:51 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:3fac082c-5e37-413e-b51b-f2395035dc78</guid><dc:creator>Hema</dc:creator><description>&lt;p&gt;Hi Susan,&lt;br /&gt; &lt;br /&gt; Please try the below code snippet,&lt;br /&gt; &lt;br /&gt; a!textField(&lt;br /&gt; label: &amp;quot;Selected Comment Row&amp;quot;,&lt;br /&gt; readOnly: true,&lt;br /&gt; value: if(&lt;br /&gt; length(&lt;br /&gt; local!gridSelection.selected&lt;br /&gt; ) = 0,&lt;br /&gt; &amp;quot;No comment row selected&amp;quot;,&lt;br /&gt; index(&lt;br /&gt; local!datasubset.data.comment,&lt;br /&gt; wherecontains(&lt;br /&gt; local!gridSelection.selected,&lt;br /&gt; local!datasubset.identifiers&lt;br /&gt; )&lt;br /&gt; )&lt;br /&gt; )&lt;br /&gt; )&lt;br /&gt; &lt;br /&gt; &lt;br /&gt; Thanks,&lt;br /&gt; Hema&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Setting up a Paging Grid Selection Component to display selected text in a text field on an interface</title><link>https://community.appian.com/thread/61054?ContentTypeID=1</link><pubDate>Wed, 03 Oct 2018 13:05:51 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:8b15e273-061f-4d09-8abd-f95860c78bce</guid><dc:creator>susana197</dc:creator><description>I get the following error: &lt;br /&gt;
Could not display interface. Please check definition and inputs.&lt;br /&gt;
Interface Definition: Expression evaluation error at function &amp;#39;index&amp;#39; parameter 3 [line 59]: Invalid index: Cannot index property &amp;#39;comment&amp;#39; of type Text into type DataSubset&lt;br /&gt;
&lt;br /&gt;
Here is my code below.  Everything works well except for the a!textField at the bottom of the interface.  I isolated the problem code using white spaces so you can jump straight to it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=load(&lt;br /&gt;
  /* Set the default paging and sorting config */&lt;br /&gt;
  local!gridSelection: a!gridSelection(&lt;br /&gt;
    selected: {},&lt;br /&gt;
    pagingInfo: a!pagingInfo(&lt;br /&gt;
      startIndex: 1,&lt;br /&gt;
      batchSize: 10,&lt;br /&gt;
      sort: a!sortInfo(&lt;br /&gt;
        field: &amp;quot;timeStamp&amp;quot;,&lt;br /&gt;
        ascending: true&lt;br /&gt;
      )&lt;br /&gt;
    )&lt;br /&gt;
  ),&lt;br /&gt;
  with(&lt;br /&gt;
    local!datasubset: a!queryEntity(&lt;br /&gt;
      entity:cons!CSHV_COMMENT_CDT,&lt;br /&gt;
      query:a!query(&lt;br /&gt;
        selection: a!querySelection(columns: {&lt;br /&gt;
          a!queryColumn(field: &amp;quot;author&amp;quot;),&lt;br /&gt;
          a!queryColumn(field: &amp;quot;status&amp;quot;),&lt;br /&gt;
          a!queryColumn(field: &amp;quot;timeStamp&amp;quot;),&lt;br /&gt;
          a!queryColumn(field: &amp;quot;comment&amp;quot;)&lt;br /&gt;
        }),&lt;br /&gt;
      filter: a!queryFilter(&lt;br /&gt;
    	field: &amp;quot;cashAdvanceId.id&amp;quot;,&lt;br /&gt;
    	operator: &amp;quot;=&amp;quot;,&lt;br /&gt;
    	value: ri!cashAdvanceData.id&lt;br /&gt;
      ),&lt;br /&gt;
        pagingInfo: local!gridSelection.pagingInfo&lt;br /&gt;
      )&lt;br /&gt;
    ),&lt;br /&gt;
    a!sectionLayout(&lt;br /&gt;
      contents: {&lt;br /&gt;
        a!gridField(&lt;br /&gt;
          label: &amp;quot;Example: Employee Grid Selection&amp;quot;,&lt;br /&gt;
          totalCount: local!datasubset.totalCount,&lt;br /&gt;
          columns: {&lt;br /&gt;
            a!gridTextColumn(label: &amp;quot;Commenter&amp;quot;, field: &amp;quot;author&amp;quot;, data: index(local!datasubset.data, &amp;quot;author&amp;quot; , {})),&lt;br /&gt;
            a!gridTextColumn(label: &amp;quot;Status&amp;quot;,  field: &amp;quot;status&amp;quot;,  data: index(local!datasubset.data, &amp;quot;status&amp;quot; , {})),&lt;br /&gt;
            a!gridTextColumn(label: &amp;quot;Date &amp;amp; Time&amp;quot;, field: &amp;quot;timeStamp&amp;quot;, data: index(local!datasubset.data, &amp;quot;timeStamp&amp;quot; , {})),&lt;br /&gt;
            a!gridTextColumn(label: &amp;quot;Comment&amp;quot;, field: &amp;quot;comment&amp;quot;, data: left(index(local!datasubset.data, &amp;quot;comment&amp;quot; , {}), 40))&lt;br /&gt;
          },&lt;br /&gt;
          identifiers: local!datasubset.identifiers,&lt;br /&gt;
          value: local!gridSelection,&lt;br /&gt;
          saveInto: {&lt;br /&gt;
            local!gridSelection&lt;br /&gt;
          },&lt;br /&gt;
          selection: true&lt;br /&gt;
        ),&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
      a!textField(&lt;br /&gt;
          label: &amp;quot;Selected Comment Row&amp;quot;,&lt;br /&gt;
          readOnly: true,&lt;br /&gt;
          value: if(&lt;br /&gt;
            length(&lt;br /&gt;
              local!gridSelection.selected&lt;br /&gt;
            ) = 0,&lt;br /&gt;
            &amp;quot;No comment row selected&amp;quot;,&lt;br /&gt;
            index(&lt;br /&gt;
              local!datasubset.comment,&lt;br /&gt;
              wherecontains(&lt;br /&gt;
                local!gridSelection.selected,&lt;br /&gt;
                local!datasubset.identifiers&lt;br /&gt;
              ),&lt;br /&gt;
              null&lt;br /&gt;
            )&lt;br /&gt;
          )&lt;br /&gt;
        )&lt;br /&gt;
  &lt;br /&gt;
         &lt;br /&gt;
        &lt;br /&gt;
        &lt;br /&gt;
        &lt;br /&gt;
        &lt;br /&gt;
      }&lt;br /&gt;
    )&lt;br /&gt;
  )&lt;br /&gt;
)&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Setting up a Paging Grid Selection Component to display selected text in a text field on an interface</title><link>https://community.appian.com/thread/61052?ContentTypeID=1</link><pubDate>Wed, 03 Oct 2018 12:46:11 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:5f12c9c0-8760-493f-93a4-1b73c5f02e67</guid><dc:creator>Hema</dc:creator><description>&lt;p&gt;Hi Susan,&lt;/p&gt;
&lt;p&gt;Please try the below code for a!textField()&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;a!textField(
          label: &amp;quot;Selected Employee IDs&amp;quot;,
          readOnly: true,
          value: if(
            length(
              local!gridSelection.selected
            ) = 0,
            &amp;quot;No employees selected&amp;quot;,
            index(
              local!datasubset.data.firstName,
              wherecontains(
                local!gridSelection.selected,
                local!datasubset.identifiers
              ),
              null
            )
          )
        )&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Hope this helps!!!&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Thanks,&lt;/p&gt;
&lt;p&gt;Hema&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Setting up a Paging Grid Selection Component to display selected text in a text field on an interface</title><link>https://community.appian.com/thread/61051?ContentTypeID=1</link><pubDate>Wed, 03 Oct 2018 12:39:39 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:13140a4a-bfca-4f9c-b36d-b46cadd6f130</guid><dc:creator>susana197</dc:creator><description>Hi all,&lt;br /&gt;
&lt;br /&gt;
Thanks for the advices, links and code.  I have tried a number of approaches but kept on hitting a road block.  Here is the closest I have come -  I adopted the code below and it works ok except for the fact that I am trying to get the firstname to display in the  a!textField (see the last part of the code).  Can you modify the code for the  a!textField so that it displays the firstname rather than the id?  I think that will finally get me through.&lt;br /&gt;
&lt;br /&gt;
Thanks.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=load(&lt;br /&gt;
  /* Set the default paging and sorting config */&lt;br /&gt;
  local!gridSelection: a!gridSelection(&lt;br /&gt;
    selected: {},&lt;br /&gt;
    pagingInfo: a!pagingInfo(&lt;br /&gt;
      startIndex: 1,&lt;br /&gt;
      batchSize: 10,&lt;br /&gt;
      sort: a!sortInfo(&lt;br /&gt;
        field: &amp;quot;lastName&amp;quot;,&lt;br /&gt;
        ascending: true&lt;br /&gt;
      )&lt;br /&gt;
    )&lt;br /&gt;
  ),&lt;br /&gt;
  with(&lt;br /&gt;
    local!datasubset: a!queryEntity(&lt;br /&gt;
      entity:cons!EMPLOYEE_ENTITY,&lt;br /&gt;
      query:a!query(&lt;br /&gt;
        selection: a!querySelection(columns: {&lt;br /&gt;
          a!queryColumn(field: &amp;quot;firstName&amp;quot;),&lt;br /&gt;
          a!queryColumn(field: &amp;quot;lastName&amp;quot;),&lt;br /&gt;
          a!queryColumn(field: &amp;quot;title&amp;quot;)&lt;br /&gt;
        }),&lt;br /&gt;
        pagingInfo: local!gridSelection.pagingInfo&lt;br /&gt;
      )&lt;br /&gt;
    ),&lt;br /&gt;
    a!sectionLayout(&lt;br /&gt;
      contents: {&lt;br /&gt;
        a!gridField(&lt;br /&gt;
          label: &amp;quot;Example: Employee Grid Selection&amp;quot;,&lt;br /&gt;
          totalCount: local!datasubset.totalCount,&lt;br /&gt;
          columns: {&lt;br /&gt;
            a!gridTextColumn(label: &amp;quot;First&amp;quot;, field: &amp;quot;firstName&amp;quot;, data: index(local!datasubset.data, &amp;quot;firstName&amp;quot; , {})),&lt;br /&gt;
            a!gridTextColumn(label: &amp;quot;Last&amp;quot;,  field: &amp;quot;lastName&amp;quot;,  data: index(local!datasubset.data, &amp;quot;lastName&amp;quot; , {})),&lt;br /&gt;
            a!gridTextColumn(label: &amp;quot;Title&amp;quot;, field: &amp;quot;title&amp;quot;, data: index(local!datasubset.data, &amp;quot;title&amp;quot; , {}))&lt;br /&gt;
          },&lt;br /&gt;
          identifiers: local!datasubset.identifiers,&lt;br /&gt;
          value: local!gridSelection,&lt;br /&gt;
          saveInto: {&lt;br /&gt;
            local!gridSelection&lt;br /&gt;
          },&lt;br /&gt;
          selection: true&lt;br /&gt;
        ),&lt;br /&gt;
        a!textField(&lt;br /&gt;
          label: &amp;quot;Selected Employee IDs&amp;quot;,&lt;br /&gt;
          readOnly: true,&lt;br /&gt;
          value: if(&lt;br /&gt;
            length(local!gridSelection.selected) = 0,&lt;br /&gt;
            &amp;quot;No employees selected&amp;quot;,&lt;br /&gt;
            joinarray(&lt;br /&gt;
              local!gridSelection.selected,&lt;br /&gt;
              &amp;quot;, &amp;quot;&lt;br /&gt;
            )&lt;br /&gt;
          )&lt;br /&gt;
        )&lt;br /&gt;
      }&lt;br /&gt;
    )&lt;br /&gt;
  )&lt;br /&gt;
)&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Setting up a Paging Grid Selection Component to display selected text in a text field on an interface</title><link>https://community.appian.com/thread/61035?ContentTypeID=1</link><pubDate>Wed, 03 Oct 2018 06:07:11 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:fe644457-cca3-4e8c-b8b5-816c07494ee8</guid><dc:creator>Hema</dc:creator><description>&lt;p&gt;Hi Susan,&lt;/p&gt;
&lt;p&gt;Please find the below code snippet,&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;load(
  local!input: {
    {
      id: 1,
      author: &amp;quot;Jack&amp;quot;,
      status: &amp;quot;In Progress&amp;quot;,
      comment: &amp;quot;Level 1 Approved&amp;quot;
    },
    {
      id: 2,
      author: &amp;quot;James&amp;quot;,
      status: &amp;quot;Completed&amp;quot;,
      comment: &amp;quot;All documents are verified&amp;quot;
    },
    {
      id: 3,
      author: &amp;quot;Lily&amp;quot;,
      status: &amp;quot;Rejected&amp;quot;,
      comment: &amp;quot;Level 1 Approved&amp;quot;
    }
  },
  /* Use query entity to get data to local!input*/
  local!pagingInfo: a!gridSelection(
    pagingInfo: a!pagingInfo(
      1,
      - 1
    )
  ),
  a!formLayout(
    contents: {
      a!gridField(
        totalCount: count(
          local!input
        ),
        columns: {
          a!gridTextColumn(
            label: &amp;quot;Author&amp;quot;,
            field: &amp;quot;author&amp;quot;,
            data: index(
              local!input,
              &amp;quot;author&amp;quot;,
              null
            )
          ),
          a!gridTextColumn(
            label: &amp;quot;Status&amp;quot;,
            field: &amp;quot;status&amp;quot;,
            data: index(
              local!input,
              &amp;quot;status&amp;quot;,
              null
            )
          ),
          a!gridTextColumn(
            label: &amp;quot;Comment&amp;quot;,
            field: &amp;quot;comment&amp;quot;,
            data: index(
              local!input,
              &amp;quot;comment&amp;quot;,
              null
            )
          )
        },
        value: local!pagingInfo,
        saveInto: local!pagingInfo,
        identifiers: local!input.id,
        selection: true,
        validations: if(
          count(
            local!pagingInfo.selected
          ) &amp;gt; 1,
          &amp;quot;Only one row can be selected&amp;quot;,
          {}
        )
      ),
      a!paragraphField(
        label: &amp;quot;Comment&amp;quot;,
        readOnly: true,
        value: index(
          local!input.comment,
          wherecontains(
            local!pagingInfo.selected,
            local!input.id
          ),
          null
        ),
        showWhen: and(
          not(
            rule!APN_isBlank(
              local!pagingInfo.selected
            )
          ),
          count(
            local!pagingInfo.selected
          ) = 1
        )
      )
    }
  )
)&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Few Suggestions,&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;In the query entity selection, include the primary key of the table. This will act as an identifier. In the above code, id is used as an identifier.&lt;/li&gt;
&lt;li&gt;As selection should be enabled for the grid, for paging info a!pagingInfo() shouldn&amp;#39;t be used. Instead, a!gridSelection() works. Please find&amp;nbsp;&lt;a title="https://docs.appian.com/suite/help/18.2/Grid_Selection_Component.html" href="https://docs.appian.com/suite/help/18.2/Grid_Selection_Component.html"&gt;this for reference&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;The attribute &amp;#39;validations&amp;#39; of a!gridField() can be used to restrict the number of selections. In the above code, I have restricted the number of selections to 1.&lt;/li&gt;
&lt;li&gt;The attribute &amp;#39;showWhen&amp;#39; of a!paragraphField() can be used to show or hide the paragraph field based on certain criteria. In the above code, I have hidden the Paragraph Field when no row is selected and when more than one row is selected.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Also, please find below the links to sail recipes for more info about paging grid.&lt;/p&gt;
&lt;p&gt;&lt;a title="https://docs.appian.com/suite/help/18.2/recipe_select_rows_in_a_grid.html" href="https://docs.appian.com/suite/help/18.2/recipe_select_rows_in_a_grid.html"&gt;https://docs.appian.com/suite/help/18.2/recipe_select_rows_in_a_grid.html&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a title="https://docs.appian.com/suite/help/18.2/recipe_limit_the_number_of_rows_in_a_grid_that_can_be_selected.html" href="https://docs.appian.com/suite/help/18.2/recipe_limit_the_number_of_rows_in_a_grid_that_can_be_selected.html"&gt;https://docs.appian.com/suite/help/18.2/recipe_limit_the_number_of_rows_in_a_grid_that_can_be_selected.html&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a title="https://docs.appian.com/suite/help/18.2/recipe_delete_rows_in_a_grid.html" href="https://docs.appian.com/suite/help/18.2/recipe_delete_rows_in_a_grid.html"&gt;https://docs.appian.com/suite/help/18.2/recipe_delete_rows_in_a_grid.html&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Hope this helps!!!&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Thanks,&lt;/p&gt;
&lt;p&gt;Hema&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Setting up a Paging Grid Selection Component to display selected text in a text field on an interface</title><link>https://community.appian.com/thread/61034?ContentTypeID=1</link><pubDate>Wed, 03 Oct 2018 05:48:16 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:916a1de1-e9f7-4a24-9ffe-c99a7b661a40</guid><dc:creator>Siva</dc:creator><description>&lt;p&gt;Hi Susana197,&lt;/p&gt;
&lt;p&gt;Please refer the below link , it will help you to play with Paging Gird Component.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://docs.appian.com/suite/help/18.3/recipe_select_rows_in_a_grid.html"&gt;https://docs.appian.com/suite/help/18.3/recipe_select_rows_in_a_grid.html&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Thanks&lt;br /&gt;Siva Chimata&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Setting up a Paging Grid Selection Component to display selected text in a text field on an interface</title><link>https://community.appian.com/thread/61032?ContentTypeID=1</link><pubDate>Wed, 03 Oct 2018 02:27:58 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:10f6e54d-5d5e-4693-af2a-76e44190523e</guid><dc:creator>Chanakya Volam</dc:creator><description>Hi &lt;a href="/members/susana197"&gt;susana197&lt;/a&gt; &lt;br /&gt;
&lt;br /&gt;
1. Since you are querying the data from database set the Identifiers parameter of pagingGrid with primary key of your data&lt;br /&gt;
2. In pagingGrid make sure to use a!gridselection in value and saveInto&lt;br /&gt;
3. Once you do this when user selects a row the ID will be stored in a!gridselection.selected&lt;br /&gt;
4. In the paragraph field use index(CDT,wherecontains(selectedID,CDT.ID))&lt;br /&gt;
&lt;br /&gt;
Hope this helps you&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>