<?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>Radio button in Grid</title><link>https://community.appian.com/discussions/f/user-interface/28193/radio-button-in-grid</link><description>Hi Everyone, 
 Is there any way to include radio button instead of check box in read only grid for selection?</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Radio button in Grid</title><link>https://community.appian.com/thread/122795?ContentTypeID=1</link><pubDate>Tue, 05 Dec 2023 20:24:15 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:4fb073ef-aa5b-41c1-9316-2e5572406efc</guid><dc:creator>Mike Schmitt</dc:creator><description>[quote userid="201015" url="~/discussions/f/user-interface/28193/radio-button-in-grid/122794"]How can we select multiple values in this grid through radio button and unselect them.[/quote]
&lt;p&gt;i&amp;#39;d just use the normal checkboxes the grid has built-in, to be quite honest.&amp;nbsp; It&amp;#39;s a completely separate use case from what the thread was originally asking about.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Radio button in Grid</title><link>https://community.appian.com/thread/122794?ContentTypeID=1</link><pubDate>Tue, 05 Dec 2023 19:18:37 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:8768cdd4-c100-4d9b-8629-040e96d996e3</guid><dc:creator>Rahul009</dc:creator><description>&lt;p&gt;Hi &lt;a href="/members/mikes0011"&gt;Mike Schmitt&lt;/a&gt;&amp;nbsp;,&lt;/p&gt;
&lt;p&gt;How can we select multiple values in this grid through radio button and unselect them.&lt;/p&gt;
&lt;p&gt;Thanks!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Radio button in Grid</title><link>https://community.appian.com/thread/110364?ContentTypeID=1</link><pubDate>Fri, 31 Mar 2023 13:57:08 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:35562857-4b9b-403d-befe-c153f64d14ce</guid><dc:creator>Mike Schmitt</dc:creator><description>&lt;p&gt;i dunno, the implementation i suggested seems quite a bit simpler to pull off &lt;span class="emoticon" data-url="https://community.appian.com/cfs-file/__key/system/emoji/1f605.svg" title="Sweat smile"&gt;&amp;#x1f605;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Radio button in Grid</title><link>https://community.appian.com/thread/110361?ContentTypeID=1</link><pubDate>Fri, 31 Mar 2023 12:56:43 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:245aa85a-e9a0-49b3-8dd2-f0e6fb4e589b</guid><dc:creator>Harshit Bumb (Appyzie)</dc:creator><description>&lt;p&gt;Good find, Sanchit!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Radio button in Grid</title><link>https://community.appian.com/thread/110360?ContentTypeID=1</link><pubDate>Fri, 31 Mar 2023 12:52:32 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:51aff1ca-f038-4d3c-b01e-177a79533d5f</guid><dc:creator>sanchitg0002</dc:creator><description>&lt;p&gt;Hi guys&amp;nbsp;,&amp;nbsp;&lt;a href="/members/shubhamy0005"&gt;shubhamy0005&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;After debugging this for quite some&amp;nbsp;time, I found a weird issue.&lt;/p&gt;
&lt;p&gt;Shubham, you are trying to provide choiceValues which are higher than the upper limit of integer type (i.e. 2147483647), your data.ciskey is having list of very large values which are not supported for display value parameter of radioButtonField, documentation says that it can take Any type values but it seems like this is not the case.&lt;/p&gt;
&lt;p&gt;Let me explain more clearly with an example (I removed the grid selection for debugging).&lt;/p&gt;
&lt;p&gt;When I provide choiceValues which are in limit, it works just perfect&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " height="61" src="/resized-image/__size/320x240/__key/communityserver-discussions-components-files/13/pastedimage1680266174649v1.png" width="215" /&gt;&lt;/p&gt;
&lt;p&gt;But when I change the value for any of the id above int limit, it just do not knows how to handle that and says, All selected values must be present in the choiceValues array, but value was &lt;strong&gt;current item&lt;/strong&gt; value and choice values was &lt;strong&gt;next item&lt;/strong&gt; value.&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " height="59" src="/resized-image/__size/320x240/__key/communityserver-discussions-components-files/13/pastedimage1680266398346v2.png" width="248" /&gt;&lt;/p&gt;
&lt;p&gt;If any one of you knows someone this should be addressed to from Appian team, then please mention them.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Now, the alternative for this particular use case is either you change the items on which you are iterating, like below code or change the data index to provide choiceValues which are supported, usually for choiceValues identifiers like 1,2,3 should be used.&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;a!localVariables(
  local!data: {
    { id: &amp;quot;2147483648&amp;quot;, name: &amp;quot;HarshitBumb.com&amp;quot; },
    { id: &amp;quot;2147483649&amp;quot;, name: &amp;quot;AppianSpace.com&amp;quot; },
    { id: &amp;quot;2147483641&amp;quot;, name: &amp;quot;chat.openai.com&amp;quot; }
  },
  local!selectedRow,
  {
    a!gridLayout(
      label: &amp;quot;Editable Grid&amp;quot;,
      labelPosition: &amp;quot;ABOVE&amp;quot;,
      headerCells: {
        a!gridLayoutHeaderCell(label: &amp;quot;&amp;quot;),
        a!gridLayoutHeaderCell(label: &amp;quot;Resources&amp;quot;)
      },
      columnConfigs: {},
      rows: a!forEach(
        items: enumerate(length(local!data)) + 1,
        expression: a!gridRowLayout(
          id: fv!item,
          contents: {
            a!radioButtonField(
              choiceLabels: &amp;quot;&amp;quot;,
              choiceValues: fv!item,
              value: if(
                tointeger(local!selectedRow) &amp;lt;&amp;gt; tointeger(fv!item),
                null,
                local!selectedRow
              ),
              saveInto: local!selectedRow
            ),
            a!richTextDisplayField(value: local!data.name[fv!index])
          }
        )
      ),
      selectionValue: local!selectedRow,
      selectionStyle: &amp;quot;ROW_HIGHLIGHT&amp;quot;,
      selectable: true,
      validations: {},
      shadeAlternateRows: true
    )
  }
)&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Radio button in Grid</title><link>https://community.appian.com/thread/110357?ContentTypeID=1</link><pubDate>Fri, 31 Mar 2023 11:02:34 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:05a7e6b1-60d7-4f22-8852-9e485cede8b3</guid><dc:creator>shubhamy0005</dc:creator><description>&lt;p&gt;After using the same variables for selected row and radio button, it gives same error.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Radio button in Grid</title><link>https://community.appian.com/thread/110346?ContentTypeID=1</link><pubDate>Fri, 31 Mar 2023 10:15:43 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:5275a7bd-1c8e-4e14-97b6-85c7de431da0</guid><dc:creator>Harshit Bumb (Appyzie)</dc:creator><description>&lt;p&gt;Your code seems to be a bit different than mine. Why are you not using the same variable to capture the selected row and radio button selection?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Radio button in Grid</title><link>https://community.appian.com/thread/110341?ContentTypeID=1</link><pubDate>Fri, 31 Mar 2023 10:02:43 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:8002e297-29e4-4ef1-9f2c-da15b392a93d</guid><dc:creator>shubhamy0005</dc:creator><description>&lt;p&gt;Hi Harshit,&lt;/p&gt;
&lt;p&gt;After adding above logic I am getting error as shown below when selecting the radio button.&lt;/p&gt;
&lt;p&gt;&lt;img src="/resized-image/__size/640x480/__key/communityserver-discussions-components-files/13/pastedimage1680256880488v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;Also here is the snippet of radio button code:&lt;/p&gt;
&lt;p&gt;&lt;img src="/resized-image/__size/640x480/__key/communityserver-discussions-components-files/13/pastedimage1680256992738v2.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Radio button in Grid</title><link>https://community.appian.com/thread/110069?ContentTypeID=1</link><pubDate>Mon, 27 Mar 2023 13:57:52 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:5993f410-93dd-41b5-afbe-5065bea4f7e7</guid><dc:creator>Mike Schmitt</dc:creator><description>&lt;p&gt;At this point honestly I&amp;#39;d just consider using a rich text icon in the relevant column, mimicing the appearance of a radio button (i guess &amp;quot;circle-o&amp;quot; and &amp;quot;dot-circle-o&amp;quot; would suffice) where you just control which one is shown by a local variable storing the selection.&amp;nbsp; One benefit here would be you could (optionally) allow for &amp;quot;de-selecting&amp;quot; the row in question without needing to force selection of a different row (depending on what you actually want it to do, of course).&lt;/p&gt;
&lt;p&gt;That would look something like this:&lt;br /&gt;&lt;img src="/resized-image/__size/320x240/__key/communityserver-discussions-components-files/13/pastedimage1679925987463v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="java"&gt;a!localVariables(
  local!choices: {
    {label: &amp;quot;asdf&amp;quot;},
    {label: &amp;quot;qwer&amp;quot;},
    {label: &amp;quot;zxcv&amp;quot;}
  },
  
  local!selectedIndex: tointeger(null()),
  
  a!gridField(
    data: local!choices,
    
    columns: {
      a!gridColumn(
        label: &amp;quot;&amp;quot;,
        align: &amp;quot;CENTER&amp;quot;,
        width: &amp;quot;ICON&amp;quot;,
        value: a!richTextDisplayField(
          value: a!richTextItem(
            size: &amp;quot;MEDIUM&amp;quot;,
            text: {
              a!richTextIcon(
                showWhen: local!selectedIndex &amp;lt;&amp;gt; fv!identifier,
                icon: &amp;quot;circle-o&amp;quot;,
                link: a!dynamicLink(
                  saveInto: a!save(local!selectedIndex, fv!identifier)
                ),
                caption: &amp;quot;Click to Select&amp;quot;,
                linkStyle: &amp;quot;STANDALONE&amp;quot;
              ),
              a!richTextIcon(
                showWhen: local!selectedIndex = fv!identifier,
                icon: &amp;quot;dot-circle-o&amp;quot;,
                link: a!dynamicLink(
                  saveInto: a!save(local!selectedIndex, tointeger(null()))
                ),
                caption: &amp;quot;Click to De-Select&amp;quot;,
                linkStyle: &amp;quot;STANDALONE&amp;quot;
              )
            }
          )
        )
      ),
      a!gridColumn(
        label: &amp;quot;Value&amp;quot;,
        value: fv!row.label
      )
    }
  )
)&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Radio button in Grid</title><link>https://community.appian.com/thread/110061?ContentTypeID=1</link><pubDate>Mon, 27 Mar 2023 10:27:25 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:8377db76-73db-4a04-992e-95ba8a44b752</guid><dc:creator>Harshit Bumb (Appyzie)</dc:creator><description>&lt;p&gt;Somewhat like this.&amp;nbsp;&lt;br /&gt;&lt;pre class="ui-code" data-mode="text"&gt;a!localVariables(
  local!data: {
    { id: 1, name: &amp;quot;HarshitBumb.com&amp;quot; },
    { id: 2, name: &amp;quot;AppianSpace.com&amp;quot; },
    { id: 3, name: &amp;quot;chat.openai.com&amp;quot; }
  },
  local!selectedRow,
  {
    a!gridLayout(
      label: &amp;quot;Editable Grid&amp;quot;,
      labelPosition: &amp;quot;ABOVE&amp;quot;,
      headerCells: {
        a!gridLayoutHeaderCell(label: &amp;quot;&amp;quot;),
        a!gridLayoutHeaderCell(label: &amp;quot;Resources&amp;quot;)
      },
      columnConfigs: {},
      rows: a!forEach(
        items: local!data,
        expression: a!gridRowLayout(
          id: fv!item.id,
          contents: {
            a!radioButtonField(
              choiceLabels: &amp;quot;&amp;quot;,
              choiceValues: fv!item.id,
              value: if(
                tointeger(local!selectedRow) &amp;lt;&amp;gt; tointeger(fv!item.id),
                null,
                tointeger(local!selectedRow)
              ),
              saveInto: local!selectedRow
            ),
            a!richTextDisplayField(value: fv!item.name)
          }
        )
      ),
      selectionValue: local!selectedRow,
      selectionStyle: &amp;quot;ROW_HIGHLIGHT&amp;quot;,
      selectable: true,
      selectionSaveInto: {},
      validations: {},
      shadeAlternateRows: true
    )
  }
)&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Radio button in Grid</title><link>https://community.appian.com/thread/110060?ContentTypeID=1</link><pubDate>Mon, 27 Mar 2023 10:19:20 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:40747b0d-2396-4a0e-b3fc-64eb988a19c2</guid><dc:creator>Harshit Bumb (Appyzie)</dc:creator><description>&lt;p&gt;But this is only possible in an editable grid. Not read-only grid.&amp;nbsp;&lt;br /&gt;You can use an editable one and make it look like read-only if required, but please remember that it will have slower performance than read-only.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Radio button in Grid</title><link>https://community.appian.com/thread/110059?ContentTypeID=1</link><pubDate>Mon, 27 Mar 2023 10:10:49 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:295031dc-b487-4c0d-94d0-64f59803bf3d</guid><dc:creator>Harshit Bumb (Appyzie)</dc:creator><description>&lt;p&gt;You can add it in a dedicated column and build custom logic around it so that when you select the radio button, it actually selects the grid row.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>