<?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>Checkbox as Radio button functionality</title><link>https://community.appian.com/discussions/f/user-interface/30396/checkbox-as-radio-button-functionality</link><description>Hi everyone! 
 I&amp;#39;d like to explain my issue. I have a Record Type for Drivers, and one of its attributes is a boolean called &amp;quot;Primary driver.&amp;quot; I&amp;#39;ve created an interface named &amp;quot;Driver&amp;quot; for entering information about a single driver, including a description</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Checkbox as Radio button functionality</title><link>https://community.appian.com/thread/128819?ContentTypeID=1</link><pubDate>Fri, 02 Feb 2024 17:34:20 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:a7fc617d-eedb-4e2f-91b6-1b2565792eed</guid><dc:creator>Abhay Dalsaniya</dc:creator><description>&lt;p&gt;See if it helps -&amp;nbsp;&lt;a href="https://docs.appian.com/suite/help/23.4/recipe-configure-a-boolean-checkbox.html"&gt;Configure a Boolean Checkbox - Appian 23.4&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Checkbox as Radio button functionality</title><link>https://community.appian.com/thread/128597?ContentTypeID=1</link><pubDate>Wed, 31 Jan 2024 20:37:21 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:f6ab9ea5-ade0-4862-aeb0-3f658da1198a</guid><dc:creator>Mike Schmitt</dc:creator><description>&lt;p&gt;I&amp;#39;m not sure what you&amp;#39;re trying to accomplish here (particularly since this is a rather old post at this point).&lt;br /&gt;&lt;br /&gt;A few issues when glancing at your code:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;neither your &amp;quot;value&amp;quot; nor your &amp;quot;saveInto&amp;quot; parameters in your CheckboxField are configured anything like my example above.&amp;nbsp; If you&amp;#39;re not actually trying to do what my example did then I&amp;#39;m not clear why you&amp;#39;re posting in this thread versus following up with Harshit and Stefan who were helping you the other day in your own brand new thread on this topic.&lt;/li&gt;
&lt;li&gt;I&amp;#39;m confused why you&amp;#39;re using the &amp;quot;split()&amp;quot; function where you load &amp;quot;local!question&amp;quot; and &amp;quot;local!option&amp;quot;.&amp;nbsp; If a rule returns an array, Appian&amp;#39;s flattened plaintext rendering of that will be separated by semicolons, but the actual array data is not.&amp;nbsp; If your &amp;quot;fetch&amp;quot; query rules are returning flattened, semicolon-delineated strings instead of text arrays, then you have some big design issues.&lt;/li&gt;
&lt;li&gt;I&amp;#39;m confused why your Checkbox Field&amp;#39;s &amp;quot;choiceValues&amp;quot; and &amp;quot;choiceLabels&amp;quot; parameters are both manually constructing their lists of options.&amp;nbsp; You should be setting these up as local variables then calling them directly from the checkbox field.&lt;/li&gt;
&lt;/ol&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Checkbox as Radio button functionality</title><link>https://community.appian.com/thread/128509?ContentTypeID=1</link><pubDate>Tue, 30 Jan 2024 15:01:28 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:c36a3ca7-b522-4e55-90a4-22212fa2a8ac</guid><dc:creator>Jai_1441</dc:creator><description>&lt;p&gt;Hi Mike, I tried to use this logic for value and saveInto parameters in my code, But still am not able to store the selected answers in local. Kindly guide me for this case where multiple answers can be selected for a question.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;pre class="ui-code" data-mode="text"&gt;a!localVariables(
  local!question: split(rule!MWJ_qe_multiCorrect_fetchQuestion(), &amp;quot;;&amp;quot;),
  local!option: split(rule!MWJ_qe_multipleCorect_options(), &amp;quot;;&amp;quot;),
  local!numberOfAnswers: 4,
  local!correctAnswer: rule!MWJ_qe_MultiCorrect_CorrectAnswer(),
  local!selectedAnswer: rule!MWJ_QE_MultiCorrectOption_SelectedAnswer(),
  local!Temp: stripwith(
    local!selectedAnswer.SelectedAnswer,
    &amp;quot;ZYWX[]:&amp;quot;
  ),
  /*local!result: intersection(local!correctAnswer, local!Temp),*/
  /*local!score: length(local!result),*/

  local!submit: false,
  {
    a!sectionLayout(
      label: &amp;quot;Exam&amp;quot;,
      contents: {
        a!forEach(
          items: local!question,
          expression: a!localVariables(
            local!currentQuestion: fv!index,
            {
              a!columnsLayout(
                columns: {
                  a!columnLayout(
                    contents: {a!checkboxField(
                      choiceLabels: {
                        a!forEach(
                          items: enumerate(local!numberOfAnswers),
                          expression: index(
                            split(stripwith(local!option, &amp;quot;[]ZYWX:&amp;quot;), &amp;quot;,&amp;quot;),
                            if(
                              local!currentQuestion = 0,
                              fv!index,
                              fv!index + local!numberOfAnswers * (local!currentQuestion - 1)
                            )
                          )
                        )
                      },
                      choiceValues: {
                        a!forEach(
                          items: enumerate(local!numberOfAnswers),
                          expression: index(
                            split(local!option, &amp;quot;,&amp;quot;),
                            if(
                              local!currentQuestion = 0,
                              fv!item,
                              fv!index + local!numberOfAnswers * (local!currentQuestion - 1)
                            )
                          )
                        )
                      },
                      label: fv!index &amp;amp; &amp;quot;.  &amp;quot; &amp;amp; fv!item,
                      labelPosition: &amp;quot;ABOVE&amp;quot;,
                      
                      
                      value: local!selectedAnswer.SelectedAnswer[local!currentQuestion],
                      saveInto:
                      a!save(
                        local!selectedAnswer.SelectedAnswer[local!currentQuestion],
                        save!value
                      ),
                      
                      
                      validations: {},
                      choiceLayout: &amp;quot;STACKED&amp;quot;,
                    )},)
                  
                },
                alignVertical: &amp;quot;TOP&amp;quot;
              ),
              a!sectionLayout(
                label: &amp;quot;&amp;quot;,
                contents: {
                  a!richTextDisplayField(
                    label: &amp;quot;Correct Answer : &amp;quot;,
                    labelPosition: &amp;quot;ABOVE&amp;quot;,
                    value: a!richTextItem(
                      text: {
                        a!forEach(
                          items: local!currentQuestion,
                          expression: index(
                            local!correctAnswer,
                            if(
                              local!currentQuestion = 0,
                              &amp;quot;&amp;quot;,
                              fv!index + 1 * (local!currentQuestion - 1)
                            )
                          )
                        )

                      },
                      color: &amp;quot;POSITIVE&amp;quot;,
                      size: &amp;quot;MEDIUM&amp;quot;,
                      style: &amp;quot;EMPHASIS&amp;quot;
                    ),
                    showWhen: local!submit

                  )

                }
              )

            }

          )
        )
      },
      marginBelow: &amp;quot;STANDARD&amp;quot;

    ),
    /*a!timeDisplayField(*/
    /*label:&amp;quot;Time Lapsed&amp;quot;,*/
    /*value:time(now())*/
    /*),*/
    a!buttonArrayLayout(
      buttons: {
        a!buttonWidget(
          label: &amp;quot;Check Score&amp;quot;,
          icon: &amp;quot;thumbs-up&amp;quot;,
          iconPosition: &amp;quot;END&amp;quot;,
          saveInto: {

            /*a!save(local!submit, save!value),*/
            /*a!save(ri!score.score,local!score)*/
          },
          /*submit: true,*/

          style: &amp;quot;GHOST&amp;quot;
        ),
        a!buttonWidget(
          label:&amp;quot;close&amp;quot;,
          value:&amp;quot;close&amp;quot;,
          saveInto: ri!buttonAction,
          submit:true,
          style: &amp;quot;SOLID&amp;quot;


        )

      },
      align: &amp;quot;CENTER&amp;quot;

    ),
    a!sectionLayout(
      labelColor: &amp;quot;POSITIVE&amp;quot;,
      contents: {
        a!columnsLayout(
          columns: {
            a!columnLayout(
              contents: {
                a!richTextDisplayField(
                  labelPosition: &amp;quot;ADJACENT&amp;quot;,

                  value:{a!richTextItem(
                    text: &amp;quot;Your Score is  &amp;quot;,
                    color: &amp;quot;ACCENT&amp;quot;,
                    size: &amp;quot;LARGE&amp;quot;,
                    style: &amp;quot;STRONG&amp;quot;

                  ),
                  a!richTextItem(
                    /*text: { local!score },*/
                    color: &amp;quot;ACCENT&amp;quot;,
                    size: &amp;quot;LARGE&amp;quot;,
                    style: &amp;quot;STRONG&amp;quot;


                  )},
                  showWhen: local!submit,
                  marginAbove: &amp;quot;STANDARD&amp;quot;

                )
              }
            )

          }
        )
      },
      isInitiallyCollapsed: true,
      dividerWeight: &amp;quot;MEDIUM&amp;quot;,
      dividerColor: &amp;quot;ACCENT&amp;quot;,
      marginAbove: &amp;quot;STANDARD&amp;quot;
    )


  }
)&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Checkbox as Radio button functionality</title><link>https://community.appian.com/thread/120816?ContentTypeID=1</link><pubDate>Mon, 23 Oct 2023 16:39:30 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:b04c6050-d358-4257-907b-b71faa68c3da</guid><dc:creator>Mike Schmitt</dc:creator><description>&lt;p&gt;For instance I was able to whip up this quick example where 3 pre-defined, simplified, &amp;quot;driver&amp;quot; array members all have a &amp;quot;isPrimary&amp;quot; element and when any of them is set to true, the others are all set to false.&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="java"&gt;a!localVariables(
  local!drivers: {
    a!map(id: 1, name: &amp;quot;Mike&amp;quot;, isPrimary: false()),
    a!map(id: 2, name: &amp;quot;Stefan&amp;quot;, isPrimary: true()),
    a!map(id: 3, name: &amp;quot;Yaha&amp;quot;, isPrimary: false())
  },
  
  a!forEach(
    local!drivers,
    
    a!localVariables(
      local!currentDriverId: fv!item.id,
      a!boxLayout(
        label: &amp;quot;Driver &amp;quot; &amp;amp; local!currentDriverId,
        marginBelow: &amp;quot;STANDARD&amp;quot;,
        contents: {
          a!textField(
            label: &amp;quot;Name&amp;quot;,
            required: true(),
            value: fv!item.name,
            saveInto: fv!item.name
          ),
          a!checkboxField(
            choiceLabels: {&amp;quot;Primary&amp;quot;},
            choiceValues: {true()},
            value: if(fv!item.isPrimary, true(), null()),
            saveInto: {
              a!save(
                local!drivers.isPrimary,
                a!forEach(
                  local!drivers,
                  if(
                    fv!item.id = local!currentDriverid,
                    if(save!value, true(), false()),
                    false()
                  )
                )
              )
            }
          )
        }
      )
    )
  )
)&lt;/pre&gt;&lt;img alt=" " src="/resized-image/__size/320x240/__key/communityserver-discussions-components-files/13/pastedimage1698079137492v1.png" /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Checkbox as Radio button functionality</title><link>https://community.appian.com/thread/120814?ContentTypeID=1</link><pubDate>Mon, 23 Oct 2023 14:50:41 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:5948ab9a-cb95-4bff-ae03-8343a643a046</guid><dc:creator>Mike Schmitt</dc:creator><description>[quote userid="234900" url="~/discussions/f/user-interface/30396/checkbox-as-radio-button-functionality"]I attempted to manage value changes, but they are saving as &amp;quot;true&amp;quot; and don&amp;#39;t change to &amp;quot;false&amp;quot; when I select another checkbox.[/quote]
&lt;p&gt;It should be possible with some (carefully implemented) semi-advanced a!save() coding.&amp;nbsp; To help you understand what you may be missing though, we&amp;#39;d really need to see that snippet of your current code (please remember to use a Code Box for code of any length so it maintains indentation, etc).&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Checkbox as Radio button functionality</title><link>https://community.appian.com/thread/120793?ContentTypeID=1</link><pubDate>Sat, 21 Oct 2023 10:31:02 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:40546214-a44f-49c8-b0e3-a168f6fd2b23</guid><dc:creator>Stefan Helzle</dc:creator><description>&lt;p&gt;Did you try to add a a!save() to the saveInto of the checkbox field that just cleans that field? Do that before storing the current value and you should be good.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>