<?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>Saving checkbox values in editable grid</title><link>https://community.appian.com/discussions/f/general/20758/saving-checkbox-values-in-editable-grid</link><description>Hi Everyone, 
 I am facing an issue and I am not sure, What I am doing wrong. 
 Here is my datasubset 
 
 I have an editable grid, which shows the record names in one of the column of grid from the above data subset and I ma trying to save the selected</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Saving checkbox values in editable grid</title><link>https://community.appian.com/thread/80880?ContentTypeID=1</link><pubDate>Mon, 12 Apr 2021 19:46:13 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:75a435b4-2e68-4074-867d-822ea83343ae</guid><dc:creator>Chris</dc:creator><description>&lt;p&gt;Hi, the main issue here is that the values such as recordname: {&amp;quot;78&amp;quot;,&amp;quot;79&amp;quot;} are actually being treated as a single value in some situations.&amp;nbsp; While the checkboxes will display the options properly, if you run a count() over the recordname, the result is 1.&lt;/p&gt;
&lt;p&gt;Without digging deep into the underlying datasubset structure as far as nested lists, etc, here is an option to save the values using a local!selections variable.&amp;nbsp; This assumes the record ID/Names are unique row by row (e.g., &amp;quot;79&amp;quot; does not appear in more than one row).&amp;nbsp; The idea is to save all selections into one variable, then when exiting the form we can apply these back into your data set - or do whatever else you need for processing.&lt;/p&gt;
&lt;p&gt;Feel free to expand on your use case from here.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="csharp"&gt;a!localVariables(
  local!data: {
    {
      record: &amp;quot;21041001&amp;quot;, 
      nbr: &amp;quot;5DM874,C217668&amp;quot;, 
      recordname: {&amp;quot;test1&amp;quot;, &amp;quot;test2&amp;quot;},
      recordIds: {&amp;quot;75&amp;quot;, &amp;quot;77&amp;quot;}, 
      reportid: {}, 
      selectedrecords: null, 
      selectedreports: {}, 
      amount: 7.0,
      recordamount: {15, 15}, 
      reportamount: {}, 
      trecordId: 76
    },
    {
      record: &amp;quot;21041100&amp;quot;, 
      nbr: &amp;quot;5DM874,C217668&amp;quot;, 
      recordname: {&amp;quot;test3&amp;quot;, &amp;quot;test4&amp;quot;},
      recordIds: {&amp;quot;78&amp;quot;, &amp;quot;79&amp;quot;}, 
      reportid: {}, 
      selectedrecords: {}, 
      selectedreports: {}, 
      amount: 7.0,
      recordamount: {15, 15}, 
      reportamount: {}, 
      trecordId: 88
    }
  },
  local!selections,
  a!forEach(
    items: local!data,
    expression: a!localVariables(
      local!options: split(fv!item.recordname,&amp;quot;; &amp;quot;),
      a!checkboxField(
        choiceLabels: local!options,
        choiceValues: local!options,
        value: if(
          rule!APN_isEmpty(local!selections),
          null,
          intersection(local!options,local!selections)
        ),
        saveInto: {
          a!save(local!selections,reject(rule!APN_isEmpty,union(local!selections,save!value)))
        },
        choiceLayout: &amp;quot;COMPACT&amp;quot;
      )
    )
  )
)&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>