<?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>Add user picker to grid</title><link>https://community.appian.com/discussions/f/general/14734/add-user-picker-to-grid</link><description>Hi, 
 
 I have a requirement to add a group picker as a column to the record type grid. Currently, we are fetching data from DS and displaying it on UI as record type grid. Additionally, I want to add a user picker to these records as an extra column</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Add user picker to grid</title><link>https://community.appian.com/thread/73111?ContentTypeID=1</link><pubDate>Mon, 06 Apr 2020 17:22:50 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:6e904cb8-f26d-413a-8a5f-5c64975aca4c</guid><dc:creator>Ashwin </dc:creator><description>&lt;p&gt;As you mention you have the data present in DB you can use expression rule to fetch the data and use the expression rule into the interface and use the above code mention by krishna&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Add user picker to grid</title><link>https://community.appian.com/thread/66024?ContentTypeID=1</link><pubDate>Sat, 20 Apr 2019 16:05:26 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:11a137f2-9ea7-44aa-9ef4-8d2deefdec74</guid><dc:creator>subramaniyanjp</dc:creator><description>&lt;p&gt;How can I load data from a CDT into a grid and also have it put inside a form so that I can submit it to save the last column (group/user picker) to the same CDT ?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Add user picker to grid</title><link>https://community.appian.com/thread/66021?ContentTypeID=1</link><pubDate>Fri, 19 Apr 2019 13:49:23 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:037946a1-2f8d-4b4d-8d26-8945eb84a53d</guid><dc:creator>Krishna Chaitanya Mallavarapu</dc:creator><description>&lt;p&gt;load(&lt;br /&gt; local!employees: {&lt;br /&gt; {&lt;br /&gt; id: 1,&lt;br /&gt; firstName: &amp;quot;John&amp;quot;,&lt;br /&gt; lastName: &amp;quot;Smith&amp;quot;&lt;br /&gt; },&lt;br /&gt; {&lt;br /&gt; id: 2,&lt;br /&gt; firstName: &amp;quot;Michael&amp;quot;,&lt;br /&gt; lastName: &amp;quot;Johnson&amp;quot;&lt;br /&gt; },&lt;br /&gt; {&lt;br /&gt; id: 3,&lt;br /&gt; firstName: &amp;quot;Mary&amp;quot;,&lt;br /&gt; lastName: &amp;quot;Reed&amp;quot;&lt;br /&gt; },&lt;br /&gt; &lt;br /&gt; },&lt;br /&gt; local!groupList: a!forEach(&lt;br /&gt; items: local!employees,&lt;br /&gt; expression: null&lt;br /&gt; ),&lt;br /&gt; a!formLayout(&lt;br /&gt; label: &amp;quot;Example&amp;quot;,&lt;br /&gt; contents: {&lt;br /&gt; a!gridLayout(&lt;br /&gt; totalCount: count(&lt;br /&gt; local!employees&lt;br /&gt; ),&lt;br /&gt; headerCells: {&lt;br /&gt; a!gridLayoutHeaderCell(&lt;br /&gt; label: &amp;quot;First Name&amp;quot;&lt;br /&gt; ),&lt;br /&gt; a!gridLayoutHeaderCell(&lt;br /&gt; label: &amp;quot;Last Name&amp;quot;&lt;br /&gt; ),&lt;br /&gt; a!gridLayoutHeaderCell(&lt;br /&gt; label: &amp;quot;Group&amp;quot;,&lt;br /&gt; align: &amp;quot;RIGHT&amp;quot;&lt;br /&gt; )&lt;br /&gt; },&lt;br /&gt; columnConfigs: {&lt;br /&gt; a!gridLayoutColumnConfig(&lt;br /&gt; width: &amp;quot;DISTRIBUTE&amp;quot;,&lt;br /&gt; weight: 3&lt;br /&gt; ),&lt;br /&gt; a!gridLayoutColumnConfig(&lt;br /&gt; width: &amp;quot;DISTRIBUTE&amp;quot;,&lt;br /&gt; weight: 3&lt;br /&gt; ),&lt;br /&gt; a!gridLayoutColumnConfig(&lt;br /&gt; width: &amp;quot;DISTRIBUTE&amp;quot;,&lt;br /&gt; weight: 3&lt;br /&gt; )&lt;br /&gt; },&lt;br /&gt; rows: a!forEach(&lt;br /&gt; items: local!employees,&lt;br /&gt; expression: a!gridRowLayout(&lt;br /&gt; contents: {&lt;br /&gt; a!textField(&lt;br /&gt; label: &amp;quot;first name &amp;quot; &amp;amp; fv!index,&lt;br /&gt; value: fv!item.firstName,&lt;br /&gt; saveInto: fv!item.firstName,&lt;br /&gt; readOnly: true()&lt;br /&gt; ),&lt;br /&gt; a!textField(&lt;br /&gt; label: &amp;quot;last name &amp;quot; &amp;amp; fv!index,&lt;br /&gt; value: fv!item.lastName,&lt;br /&gt; saveInto: fv!item.lastName,&lt;br /&gt; readOnly: true()&lt;br /&gt; ),&lt;br /&gt; a!pickerFieldUsersAndGroups(&lt;br /&gt; value: local!groupList[fv!index],&lt;br /&gt; saveInto: local!groupList[fv!index],&lt;br /&gt; maxSelections: 1&lt;br /&gt; )&lt;br /&gt; },&lt;br /&gt; id: fv!index&lt;br /&gt; )&lt;br /&gt; ),&lt;br /&gt; rowHeader: 1&lt;br /&gt; )&lt;br /&gt; },&lt;br /&gt; buttons: a!buttonLayout(&lt;br /&gt; primaryButtons: a!buttonWidget(&lt;br /&gt; label: &amp;quot;Submit&amp;quot;,&lt;br /&gt; submit: true&lt;br /&gt; )&lt;br /&gt; )&lt;br /&gt; )&lt;br /&gt;)&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;When&amp;nbsp; submitting&amp;nbsp; the form save local value to your cdt like&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;a!forEach(&lt;br /&gt; items: local!groupList,&lt;br /&gt; expression: a!save(&lt;br /&gt; ri!cdt[fv!index].group,&lt;br /&gt; fv!item&lt;br /&gt; )&lt;br /&gt;)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>