<?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>Selectable grid</title><link>https://community.appian.com/discussions/f/new-to-appian/23974/selectable-grid</link><description>Hi, I am trying build read only selectable grid. 
 a!localVariables( local!businessModuleStatus: rule!CR_QE_getModuleStatusForBusiness( cif_int: ri!cif_int, moduleId_int: ri!moduleId_int ), a!boxLayout( label: index( local!businessModuleStatus, &amp;quot;workflowDesc_txt</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Selectable grid</title><link>https://community.appian.com/thread/119200?ContentTypeID=1</link><pubDate>Thu, 14 Sep 2023 07:40:56 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:df647240-d1cf-4629-8597-965a3e6160e4</guid><dc:creator>maramg2533</dc:creator><description>&lt;p&gt;how can i fetch a specific field from fv!selectedRows?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Selectable grid</title><link>https://community.appian.com/thread/92322?ContentTypeID=1</link><pubDate>Wed, 16 Mar 2022 11:49:38 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:f3818b2c-a21b-4f42-9569-dc128b16784f</guid><dc:creator>sid</dc:creator><description>&lt;p&gt;Thank you .&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Selectable grid</title><link>https://community.appian.com/thread/92321?ContentTypeID=1</link><pubDate>Wed, 16 Mar 2022 11:49:16 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:59f31528-3172-4778-bfcd-b9e07b97548c</guid><dc:creator>sid</dc:creator><description>&lt;p&gt;Thank you.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Selectable grid</title><link>https://community.appian.com/thread/92306?ContentTypeID=1</link><pubDate>Wed, 16 Mar 2022 08:06:58 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:e081e62e-586a-4477-bfb6-00e92f6ce48c</guid><dc:creator>GopalK</dc:creator><description>&lt;p&gt;You can&amp;nbsp;limit the selection . Please go through the link which viraty shared.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Selectable grid</title><link>https://community.appian.com/thread/92305?ContentTypeID=1</link><pubDate>Wed, 16 Mar 2022 08:04:14 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:4744d614-0e18-4d1d-9d49-c84b7ea80041</guid><dc:creator>viratyogi</dc:creator><description>&lt;p&gt;you can restrict the row selection please refer this&amp;nbsp;&lt;a href="https://docs.appian.com/suite/help/21.4/recipe-limit-rows-to-one.html"&gt;Limit Grid Selection to One Row&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Selectable grid</title><link>https://community.appian.com/thread/92304?ContentTypeID=1</link><pubDate>Wed, 16 Mar 2022 08:00:46 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:5399e46d-48ac-491d-ad36-7ead2d1b65fc</guid><dc:creator>maaaaj0001</dc:creator><description>&lt;p&gt;But we need only one selection at a time. In fv!selected multiple rows will be selected&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Selectable grid</title><link>https://community.appian.com/thread/92303?ContentTypeID=1</link><pubDate>Wed, 16 Mar 2022 07:57:19 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:cb314e5a-52e1-48f1-9cae-299bfb1b97c9</guid><dc:creator>viratyogi</dc:creator><description>&lt;p&gt;as you select the value the index is what gets selected you must have been saving it in ri or local, please pass that&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Selectable grid</title><link>https://community.appian.com/thread/92302?ContentTypeID=1</link><pubDate>Wed, 16 Mar 2022 07:45:55 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:5cde6e02-8ffd-4780-867d-64aa16be58f5</guid><dc:creator>sid</dc:creator><description>&lt;p&gt;a!localVariables(&lt;br /&gt; local!businessModuleStatus: rule!CR_QE_getModuleStatusForBusiness(&lt;br /&gt; cif_int: ri!cif_int,&lt;br /&gt; moduleId_int: ri!moduleId_int&lt;br /&gt; ),&lt;br /&gt; local!selectedId_int,&lt;br /&gt; local!selectedValues,&lt;br /&gt; a!boxLayout(&lt;br /&gt; label: index(&lt;br /&gt; local!businessModuleStatus,&lt;br /&gt; &amp;quot;workflowDesc_txt&amp;quot;,&lt;br /&gt; &amp;quot;&amp;quot;&lt;br /&gt; ),&lt;br /&gt; style: &amp;quot;ACCENT&amp;quot;,&lt;br /&gt; contents: a!gridField(&lt;br /&gt; data: local!businessModuleStatus,&lt;br /&gt; columns: {&lt;br /&gt; a!gridColumn(&lt;br /&gt; label: cons!MODULE_STATUS_GRID_FIELDS_FOR_BUSINESS[1],&lt;br /&gt; sortField: cons!CR_APP_MODULE_STATUS_GRID_FIELDS_FOR_BUSINESS[1],&lt;br /&gt; value: fv!row.workflowDesc_txt&lt;br /&gt; ),&lt;br /&gt; a!gridColumn(&lt;br /&gt; label: cons!MODULE_STATUS_GRID_FIELDS_FOR_BUSINESS[2],&lt;br /&gt; sortField: cons!CR_APP_MODULE_STATUS_GRID_FIELDS_FOR_BUSINESS[2],&lt;br /&gt; value: rule!APN_FN_getDisplayName(&lt;br /&gt; userId: fv!row.initiatedBy_txt&lt;br /&gt; ),&lt;br /&gt; &lt;br /&gt; ),&lt;br /&gt; a!gridColumn(&lt;br /&gt; label: cons!CR_APP_MODULE_STATUS_GRID_FIELDS_FOR_BUSINESS[3],&lt;br /&gt; sortField: cons!CR_APP_MODULE_STATUS_GRID_FIELDS_FOR_BUSINESS[3],&lt;br /&gt; value: rule!CR_FN_nbfDateTimeFormat(&lt;br /&gt; input: fv!row.initiatedOn_dt&lt;br /&gt; ),&lt;br /&gt; &lt;br /&gt; ),&lt;br /&gt; a!gridColumn(&lt;br /&gt; label: cons!CR_APP_MODULE_STATUS_GRID_FIELDS_FOR_BUSINESS[4],&lt;br /&gt; sortField: cons!CR_APP_MODULE_STATUS_GRID_FIELDS_FOR_BUSINESS[4],&lt;br /&gt; value: fv!row.moduleStatus_txt&lt;br /&gt; ),&lt;br /&gt; a!gridColumn(&lt;br /&gt; label: cons!CR_APP_MODULE_STATUS_GRID_FIELDS_FOR_BUSINESS[5],&lt;br /&gt; sortField: cons!CR_APP_MODULE_STATUS_GRID_FIELDS_FOR_BUSINESS[5],&lt;br /&gt; value: rule!APN_FN_getDisplayName(&lt;br /&gt; userId: fv!row.approvedBy_txt&lt;br /&gt; )&lt;br /&gt; ),&lt;br /&gt; a!gridColumn(&lt;br /&gt; label: cons!CR_APP_MODULE_STATUS_GRID_FIELDS_FOR_BUSINESS[6],&lt;br /&gt; sortField: cons!CR_APP_MODULE_STATUS_GRID_FIELDS_FOR_BUSINESS[6],&lt;br /&gt; value: rule!CR_FN_nbfDateTimeFormat(&lt;br /&gt; input: fv!row.approvedOn_dt&lt;br /&gt; ),&lt;br /&gt; &lt;br /&gt; ),&lt;br /&gt; &lt;br /&gt; },&lt;br /&gt; selectable: true,&lt;br /&gt; selectionStyle: &amp;quot;ROW_HIGHLIGHT&amp;quot;,&lt;br /&gt; selectionValue: local!selectedId_int,&lt;br /&gt; selectionSaveInto: {&lt;br /&gt; local!selectedId_int,&lt;br /&gt; /*a!save(*/&lt;br /&gt; /*local!selectedId_int,*/&lt;br /&gt; /*tointeger(*/&lt;br /&gt; /*index(*/&lt;br /&gt; /*reverse(*/&lt;br /&gt; /*fv!selectedRows*/&lt;br /&gt; /*),*/&lt;br /&gt; /*1,*/&lt;br /&gt; /*null*/&lt;br /&gt; /*)*/&lt;br /&gt; /*)*/&lt;br /&gt; /*),*/&lt;br /&gt; a!save(&lt;br /&gt; local!selectedValues,&lt;br /&gt; append(&lt;br /&gt; local!selectedValues,&lt;br /&gt; fv!selectedRows&lt;br /&gt; )&lt;br /&gt; ),&lt;br /&gt; a!save(&lt;br /&gt; local!selectedValues,&lt;br /&gt; difference(&lt;br /&gt; local!selectedValues,&lt;br /&gt; fv!deselectedRows&lt;br /&gt; )&lt;br /&gt; ),&lt;br /&gt; a!save(&lt;br /&gt; ri!inputSelectedId_int,&lt;br /&gt; local!selectedValues.inputRequestId1_int&lt;br /&gt; ),&lt;br /&gt; a!save(&lt;br /&gt; ri!systemSelectedId_int,&lt;br /&gt; local!selectedValues.systemRequestId_int&lt;br /&gt; )&lt;br /&gt; }&lt;/p&gt;
&lt;p&gt;Now I am getting both values ,but it is selecting mutliple rows but my requirement is single row to be selected. Can you please help in this?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Selectable grid</title><link>https://community.appian.com/thread/92299?ContentTypeID=1</link><pubDate>Wed, 16 Mar 2022 06:19:11 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:420ee388-1398-4ec1-8b1e-32452fb00c00</guid><dc:creator>GopalK</dc:creator><description>&lt;p&gt;Hi, After selection , you dont need to index to choose selected row, you can just&amp;nbsp; use fv!selectedRows for selection&amp;nbsp; and&amp;nbsp;fv!deselectedRows for deselection. You can go through the link provided by viraty as well.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Selectable grid</title><link>https://community.appian.com/thread/92298?ContentTypeID=1</link><pubDate>Wed, 16 Mar 2022 06:18:11 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:c8317ee9-e89f-468c-aeb3-9b9e28d5a2c4</guid><dc:creator>sid</dc:creator><description>&lt;p&gt;what is here&amp;nbsp;[selectedIndex]? Could you please tell?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Selectable grid</title><link>https://community.appian.com/thread/92297?ContentTypeID=1</link><pubDate>Wed, 16 Mar 2022 06:00:05 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:5089b83f-27f4-4ede-b2a0-f0830f30fb86</guid><dc:creator>viratyogi</dc:creator><description>&lt;p&gt;Hi it seems you have a problem while saving the value in&amp;nbsp;&amp;nbsp;&lt;strong&gt;&lt;span&gt;ri!systemSelectedId_int, &lt;/span&gt;&lt;/strong&gt;I&amp;#39;m assuming you want to save the&amp;nbsp;&lt;span&gt;systemRequestId_int of the selected row, what is&amp;nbsp;happening in the code above is all the&amp;nbsp;systemRequestId_int&amp;nbsp; are getting saved in the ri due to the below code&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;pre class="ui-code" data-mode="text"&gt;a!save(
ri!systemSelectedId_int,
index(
local!businessModuleStatus,
&amp;quot;systemRequestId_int&amp;quot;,
&amp;quot;&amp;quot;
)&lt;/pre&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;But I suppose the ri can only hold single value hence it will get the very first value every time in order to save the selected row value use this&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;pre class="ui-code" data-mode="text"&gt;a!save(
ri!systemSelectedId_int,
index(
local!businessModuleStatus,
&amp;quot;systemRequestId_int&amp;quot;,
&amp;quot;&amp;quot;
)[selectedIndex]&lt;/pre&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;If you are showing a read-only grid that requires selection there is a very useful SAIL recipe for the same&amp;nbsp;&amp;nbsp;&lt;a href="https://docs.appian.com/suite/help/21.4/grid-with-selection-pattern.html"&gt;read only grid with selection&lt;/a&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I hope this helps &lt;span class="emoticon" data-url="https://community.appian.com/cfs-file/__key/system/emoji/1f642.svg" title="Slight smile"&gt;&amp;#x1f642;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>