<?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>Getting the usernames of users selected from gridField</title><link>https://community.appian.com/discussions/f/user-interface/14289/getting-the-usernames-of-users-selected-from-gridfield</link><description>Hi. I&amp;#39;m trying to create a selectable gridField similar to the one in this guide: https://docs.appian.com/suite/help/18.3/recipe_select_rows_in_a_grid.html . However, the gridField here only returns the IDs of selected users, which are profoundly less</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Getting the usernames of users selected from gridField</title><link>https://community.appian.com/thread/64468?ContentTypeID=1</link><pubDate>Tue, 05 Feb 2019 21:37:14 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:813304df-3ef3-4850-ae45-0bf87b9cc321</guid><dc:creator>Jose Cavazos</dc:creator><description>&lt;p&gt;a!save(ri!test,&lt;br /&gt; index(&lt;br /&gt; local!datasubset.data,&lt;br /&gt; wherecontains(&lt;br /&gt; local!gridSelection.selected,&lt;br /&gt; index(local!datasubset.data,&amp;quot;yourIDField&amp;quot;,&amp;quot;&amp;quot;)&lt;br /&gt; )&lt;br /&gt; )&lt;br /&gt; )&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Your identifiers are going to be your primary key so you are finding in the data subset those indexes and you are going to save those indexes into your rule input.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Getting the usernames of users selected from gridField</title><link>https://community.appian.com/thread/64467?ContentTypeID=1</link><pubDate>Tue, 05 Feb 2019 20:55:39 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:c5845d94-cdb7-48d0-b15f-961741184d1a</guid><dc:creator>danielh0002</dc:creator><description>&lt;p&gt;Here&amp;#39;s the solution I eventually came to. It&amp;#39;s looks clunky, but it makes ri!test an accurate array of what you have selected.&amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;saveInto: {
    local!gridSelection,
    a!save(
        ri!test,
        a!forEach(
            items: local!gridSelection.selected,
            expression: with(
                local!griditemid: fv!item,
                index(
                    local!externalDataSubset.data, 
                    where(
                        a!forEach(
                            items: local!externalDataSubset.data,
                            expression: {
                                local!griditemid = index(fv!item, &amp;quot;id&amp;quot;)
                            }
                        )
                    )
                )
            )
        )
    )
},&lt;/pre&gt;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Getting the usernames of users selected from gridField</title><link>https://community.appian.com/thread/64465?ContentTypeID=1</link><pubDate>Tue, 05 Feb 2019 19:47:04 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:e68d42ff-34e0-4c30-a84c-5f152c9d79bd</guid><dc:creator>danielh0002</dc:creator><description>I think there&amp;#39;s a problem with your solution. After trying this with a handful of entries, it seems you&amp;#39;re using the IDs you get from local.gridSelection.selected as indexes, for the index() function (I think). This doesn&amp;#39;t always work, because the elements in the datasubset can be out of ID order, or have gaps between their IDs, so you end up getting the wrong elements in the rule input variable.&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Getting the usernames of users selected from gridField</title><link>https://community.appian.com/thread/64460?ContentTypeID=1</link><pubDate>Tue, 05 Feb 2019 19:10:12 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:8d168250-da89-4eff-95ad-773a9f669754</guid><dc:creator>Jose Cavazos</dc:creator><description>&lt;p&gt;Hi Daniel,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;You can use the following example.&lt;/p&gt;
&lt;p&gt;You are going to still save your Grid Selection with ids and you can use those ids as an index to retrieve the full element.&lt;/p&gt;
&lt;p&gt;Add a test rule input as (Any Type).&lt;/p&gt;
&lt;p&gt;&lt;a href="/cfs-file/__key/communityserver-discussions-components-files/13/pastedimage1549397271181v1.png"&gt;&lt;img src="/resized-image/__size/320x240/__key/communityserver-discussions-components-files/13/pastedimage1549397271181v1.png" alt=" " /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;a href="/cfs-file/__key/communityserver-discussions-components-files/13/pastedimage1549397413957v2.png"&gt;&lt;img src="/resized-image/__size/320x240/__key/communityserver-discussions-components-files/13/pastedimage1549397413957v2.png" alt=" " /&gt;&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>