<?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>How to create conditional checkbox ?</title><link>https://community.appian.com/discussions/f/user-interface/10652/how-to-create-conditional-checkbox</link><description>Hi Community, 
 
 How can i make checkbox visible/hidden based on previous DropDown value. 
 For ex - I have dropdown field as Product having values - KFC, Pizzahut. 
 I have different checkboxes values if user selects KFC or Pizzahut. 
 How can i show</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: How to create conditional checkbox ?</title><link>https://community.appian.com/thread/48271?ContentTypeID=1</link><pubDate>Tue, 05 Sep 2017 14:45:26 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:6ee90a5c-5bfa-4a18-9ac8-d3f15ab916a6</guid><dc:creator>Mike Schmitt</dc:creator><description>As  said, there should be enough info here already for you to go on.  I guess my one last suggestion now that you&amp;#39;ve moved back to a nested CDT approach is, you don&amp;#39;t need the JSON stuff anymore, and an approach somewhat closer to my original code should work (just need to take care of the extra new fields you&amp;#39;ve added).&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to create conditional checkbox ?</title><link>https://community.appian.com/thread/48265?ContentTypeID=1</link><pubDate>Tue, 05 Sep 2017 09:58:46 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:5ec9c8db-8e8e-40de-bb2e-462f1e28b2b6</guid><dc:creator>PhilB</dc:creator><description>&lt;p&gt;Having reached nearly 50 replies on this thread alone (and a not inconsiderable quantity of code), there&amp;#39;s more than enough information to complete this requirement in this post, the other post regarding data structures, and the documentation.&lt;/p&gt;
&lt;p&gt;FYI, the answer to the latest point is pretty much &amp;quot;use dot notation&amp;quot;, which, again, is explained in Appian&amp;#39;s &lt;a href="https://docs.appian.com/suite/help/17.3/Expressions.html#variables"&gt;extensive documentation&lt;/a&gt;.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to create conditional checkbox ?</title><link>https://community.appian.com/thread/48261?ContentTypeID=1</link><pubDate>Tue, 05 Sep 2017 07:07:36 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:159473a0-8d7e-465a-9713-4df58750c6c4</guid><dc:creator>prais1852</dc:creator><description>&lt;p&gt;Hi &amp;nbsp;Sorry to disturb you again for the same problem. As you know i had to change my CDT to maintain DB naming convention of tables and columns. Can you please help me now with the original requirment ?&lt;/p&gt;
&lt;p&gt;Attached are 3 CDTs that i have created. 1 parent and 2 child which have 1 to many relationship.&lt;/p&gt;
&lt;p&gt;&lt;a href="/cfs-file/__key/communityserver-discussions-components-files/13/1.PNG"&gt;&lt;img src="/resized-image/__size/320x240/__key/communityserver-discussions-components-files/13/1.PNG" alt=" " /&gt;&lt;/a&gt;&lt;a href="/cfs-file/__key/communityserver-discussions-components-files/13/1411.2.PNG"&gt;&lt;img src="/resized-image/__size/320x240/__key/communityserver-discussions-components-files/13/1411.2.PNG" alt=" " /&gt;&lt;/a&gt;&lt;a href="/cfs-file/__key/communityserver-discussions-components-files/13/32.PNG"&gt;&lt;img src="/resized-image/__size/320x240/__key/communityserver-discussions-components-files/13/32.PNG" alt=" " /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;To give you idea CCCNumber in my Parent CDT is a PK and auto-incremented filed. Similarly&amp;nbsp;NodesAffectedID and&amp;nbsp;ToolsAffectedID in other 2 CDTs.&lt;/p&gt;
&lt;p&gt;NodesAffectedCCCNumber and&amp;nbsp;ToolsAffectedCCCNumber are Foreign key which map to CCCNumber. So as soon as user enters the record i want&amp;nbsp;NodesAffectedCCCNumber and&amp;nbsp;ToolsAffectedCCCNumber &amp;nbsp;to be same as CCCNumber because then only i will get a joining condition to query from my DB and get 1 to many relationship result. I know you suggested JSON approch to make checkboxes filed work when i was using Text array but know i am using Nested CDT. Can you please still be able to help me for the last time ?&lt;/p&gt;
&lt;p&gt;Let me know if you need any other information on this.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to create conditional checkbox ?</title><link>https://community.appian.com/thread/48215?ContentTypeID=1</link><pubDate>Fri, 01 Sep 2017 14:03:37 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:e046f6a2-6a71-4cc4-bf0d-2d227a3fee34</guid><dc:creator>prais1852</dc:creator><description> You are awesome. It worked. Thanks a lot.&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to create conditional checkbox ?</title><link>https://community.appian.com/thread/48212?ContentTypeID=1</link><pubDate>Fri, 01 Sep 2017 13:34:21 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:2a00be1f-c2be-4847-91f4-22b9d55b27f7</guid><dc:creator>Mike Schmitt</dc:creator><description>&lt;p&gt;Since I&amp;#39;m feeling generous, I went back to my old example and converted it to be able to store its saved values in a new CDT containing fields pretty much exactly like yours:&lt;/p&gt;
&lt;p&gt;&lt;a href="/cfs-file/__key/communityserver-discussions-components-files/13/3821.pastedimage1504272518045v1.png"&gt;&lt;img src="/resized-image/__size/320x240/__key/communityserver-discussions-components-files/13/3821.pastedimage1504272518045v1.png" alt=" " /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;I&amp;#39;m doing the JSON conversion like I referenced in my prior reply - notice that I created a new WITH variable which checks whether there&amp;#39;s any value in the &amp;quot;Size&amp;quot; array (in your version that would be &amp;quot;NodesAffected&amp;quot;), and if so, translates each one back from a JSON string to dictionary data (like was originally used in my original version); then in the checkbox field, it uses this local variable for display, but saves directly into ri!menuSelectionCdt.Size (converting the saved values into a JSON string prior to storing them in the text varray).&amp;nbsp; You should be able to translate this pretty much directly into your use case.&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;load(

  local!restaurantChoices: {
    {id: 1, name: &amp;quot;KFC&amp;quot;}, 
    {id: 2, name: &amp;quot;Pizza Hut&amp;quot;}
  },
  local!selectedRestaurant,
  local!menuSelection: {},
  
  /*local!menuSelectionSizes: {},*/
  
  with(
    
    /* dynamically set the menu choices based on which restaurant is picked */
    local!menuChoices: if(
      isnull(ri!menuSelectionCdt.RestaurantSelected),
      {},
      if(
        tointeger(ri!menuSelectionCdt.RestaurantSelected) = 1,
        {
          &amp;quot;Fried Chicken&amp;quot;, &amp;quot;Mashed Potatoes&amp;quot;, &amp;quot;Cole Slaw&amp;quot;, &amp;quot;Biscuits&amp;quot;, &amp;quot;Gravy&amp;quot;
        },
        if(
          tointeger(ri!menuSelectionCdt.RestaurantSelected) = 2,
          {
            &amp;quot;Pizza&amp;quot;, &amp;quot;Bread Sticks&amp;quot;, &amp;quot;Salad Bar&amp;quot;, &amp;quot;Soft Drinks&amp;quot;
          },
          {}
        )
      )
    ),
    
    
    /* set up Menu Selection Sizes to be an array of dictionary -
      the format will resemble this: 
      {
        item: &amp;quot;item name&amp;quot;,
        size: {sizeIds}
      }
    */
    
    /* NEW: so we can store these selections safely in a TEXT cdt value, we 
    will convert them to JSON strings for storage in the CDT, and back
    into dictionary data for use in the form. */    
    local!menuSelectionSizes: if(
      apn_isEmpty(ri!menuSelectionCdt.Size),
      {},
      apply( /* since there will be a separate JSON string for each menu selection */
        a!fromJson,
        ri!menuSelectionCdt.Size
      )
    ),
    
    a!formLayout( 
    /* now assuming 17.2 or newer */
      
      contents: {
        a!radioButtonField(
          label: &amp;quot;Chain:&amp;quot;,
          labelPosition: &amp;quot;ADJACENT&amp;quot;,
          choiceLabels: local!restaurantChoices.name,
          choiceValues: local!restaurantChoices.id,
          value: ri!menuSelectionCdt.RestaurantSelected,
          saveInto: {
            ri!menuSelectionCdt.RestaurantSelected,
            
            /* the below will clear the previous menu selection when the restaurant is changed */
            a!save(
              ri!menuSelectionCdt.MenuSelections,
              {}
            )
          }
        ),
        
        if(
          not(isnull(ri!menuSelectionCdt.RestaurantSelected)),
          a!checkBoxField(
            label: &amp;quot;Make your food choices:&amp;quot;,
            labelPosition: &amp;quot;ADJACENT&amp;quot;,
            choiceLabels: local!menuChoices,
            choiceValues: local!menuChoices,
            value: ri!menuSelectionCdt.MenuSelections,
            saveInto: {
              a!save(
                ri!menuSelectionCdt.MenuSelections,
                /* this weird saveInto style will attempt to keep the saved value array in the same order as the
                initial checkboxes, since Appian versions 17.1 and later no longer do this automatically */
                index(
                  local!menuChoices,
                  whereContains(
                    save!value,
                    local!menuChoices
                  )
                )
              )
            }
          ),
          {}
        ),
        a!columnsLayout(
          columns: a!forEach(
            ri!menuSelectionCdt.MenuSelections,
            with(
              local!currentIndex: wherecontains(
                fv!item,
                touniformstring(property(local!menuSelectionSizes, &amp;quot;item&amp;quot;, {}))
              ),
              a!columnLayout(
                contents: {
                  a!checkboxField(
                    label: &amp;quot;Select Size: &amp;#39;&amp;quot; &amp;amp; fv!item &amp;amp; &amp;quot;&amp;#39;&amp;quot;,
                    labelPosition: &amp;quot;ABOVE&amp;quot;,
                    choiceLabels: {&amp;quot;Small&amp;quot;, &amp;quot;Medium&amp;quot;, &amp;quot;Large&amp;quot;},
                    choiceValues: {1, 2, 3},
                    value: tointeger(
                      property(
                        index(
                          local!menuSelectionSizes,
                          local!currentIndex,
                          null()
                        ),
                        &amp;quot;sizes&amp;quot;,
                        null()
                      )
                    ),
                    saveInto: {
                      a!save(
                        ri!menuSelectionCdt.Size,
                        append(
                          if(
                            isnull(local!currentIndex),
                            ri!menuSelectionCdt.Size,
                            remove(ri!menuSelectionCdt.Size, local!currentIndex)
                          ),
                          if(
                            apn_isEmpty(save!value),
                            /* indicates all size choices have been de-selected, so we&amp;#39;ll save an empty set here to remove this menu choice from the saved data set */
                            a!toJson({}),
                            a!toJson(
                              {
                                item: fv!item,
                                sizes: save!value
                              }
                            )
                          )
                        ) 
                      )
                    }
                  )
                }
              )
            )
          )
        ),
        
        a!paragraphField(
          label: &amp;quot;(debug info)&amp;quot;,
          value: &amp;quot;Menu Selection Size choices converted back from JSON: &amp;quot; &amp;amp; char(10) &amp;amp; local!menuSelectionSizes
        ),
        
        {}
      } 
    )
  )
)&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to create conditional checkbox ?</title><link>https://community.appian.com/thread/48211?ContentTypeID=1</link><pubDate>Fri, 01 Sep 2017 13:27:45 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:ffbe9c63-3069-4793-a01d-a9fc923ced04</guid><dc:creator>prais1852</dc:creator><description>&lt;p&gt;&amp;nbsp;If i would like to go with saving in JSON string. How can i do that ? Can you share some links for help if possible ? I am really scared of dealing with Nested CDTs, Managin CDTs is tough for me.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to create conditional checkbox ?</title><link>https://community.appian.com/thread/48210?ContentTypeID=1</link><pubDate>Fri, 01 Sep 2017 13:13:05 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:0bd44a59-cfa9-48de-a425-7320648c9dd6</guid><dc:creator>Mike Schmitt</dc:creator><description>One initial issue I see in your code &amp;amp; cdt definition is: when you&amp;#39;re saving into ri!CCC.NodesAffected, my original rule is assuming the local variable (local!menuSelectionSizes) is capable of holding dictionary data - i&amp;#39;m saving {item: fv!item, sizes: save!value} -- you&amp;#39;re doing the same thing (except turned into Tool/Nodes), except the data type you&amp;#39;re saving it into is Text, not Dictionary or CDT or &amp;quot;Any Type&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
You might want to consider making a new CDT consisting of the fields &amp;quot;Tool&amp;quot; (single) and &amp;quot;Nodes&amp;quot; (multiple), and switching the NodesAffected property in your original CDT to be of that new type (also multiple).  After that your saves might work.  &lt;br /&gt;
&lt;br /&gt;
If you have the need to not do a nested CDT, however, you could also consider converting the value being saved into a JSON string, which you can store in a single text field like your CDT already has, except that would require conversion to be done both at saving and at loading time.&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to create conditional checkbox ?</title><link>https://community.appian.com/thread/48201?ContentTypeID=1</link><pubDate>Fri, 01 Sep 2017 10:37:46 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:76ea8775-265a-4738-a2bd-5632c618d4cb</guid><dc:creator>prais1852</dc:creator><description>Sure no problem   Thanks for your efforts.&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to create conditional checkbox ?</title><link>https://community.appian.com/thread/48192?ContentTypeID=1</link><pubDate>Fri, 01 Sep 2017 05:28:11 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:37e93e3f-aa30-4fdb-82e9-d9a4a0b1574a</guid><dc:creator>prais1852</dc:creator><description>Hi   i guess you missed the full conversation. Version is not a point of worry now. It&amp;#39;s just some feature which are not working with rule input in 17.2 but working with local variables.&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to create conditional checkbox ?</title><link>https://community.appian.com/thread/48191?ContentTypeID=1</link><pubDate>Fri, 01 Sep 2017 05:21:30 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:cc650d96-85b8-49ec-9363-b6369ca7eadd</guid><dc:creator>aloks0189</dc:creator><description>&lt;p&gt;&lt;a href="/members/prasoonp"&gt;prais1852&lt;/a&gt;&amp;nbsp;First of all, migrating from Higher Version to Lower version is never a good approach. Because this require lot of changes to be done in your application.&lt;br /&gt; &lt;br /&gt; Now coming back to your requirement, there are no alternative for a!columnsLayout(). Till 17.1 version, we had max 2 columns for each UI, while UI designing, whereas from 17.2 on-wards a!columnsLayout() added more flexibility to have multiple columns as per our need. &lt;br /&gt; &lt;br /&gt; So, if you have switched from 17.2 to 17.1, i recommend change your layouts and their contents. And also replace all those functions which are introduced in 17.2 with their similar one in 17.1 as already been discussed above&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to create conditional checkbox ?</title><link>https://community.appian.com/thread/48184?ContentTypeID=1</link><pubDate>Thu, 31 Aug 2017 21:18:29 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:1e2d5105-be1c-4473-a38f-b72b9284c64f</guid><dc:creator>Mike Schmitt</dc:creator><description>Sorry, was a bit busy today - i&amp;#39;ll try to take a look at it tomorrow.&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to create conditional checkbox ?</title><link>https://community.appian.com/thread/48177?ContentTypeID=1</link><pubDate>Thu, 31 Aug 2017 15:28:00 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:1038db2a-554a-40b1-8b85-75b8536be6ee</guid><dc:creator>prais1852</dc:creator><description>Hi   Can you please help me now ?&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to create conditional checkbox ?</title><link>https://community.appian.com/thread/48155?ContentTypeID=1</link><pubDate>Wed, 30 Aug 2017 19:53:03 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:3acf74db-bd0e-4bc2-9ed8-14fcbcba85d4</guid><dc:creator>prais1852</dc:creator><description>&lt;p&gt;Hi &amp;nbsp;Thank you for your help. Here are the details -&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Something like the below attached screenshot i am trying to achieve on my interface -&lt;/p&gt;
&lt;p&gt;&lt;a href="/cfs-file/__key/communityserver-discussions-components-files/13/2.PNG"&gt;&lt;img src="/resized-image/__size/320x240/__key/communityserver-discussions-components-files/13/2.PNG" alt=" " /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Where Product Group Affected has a dropdown value coming from constant, Tools affected values are coming from an expression rule based on Product Group affected selection and finally foreach() loop for Nodes Affected for each Tool. But Nodes Affected checkbox selections are not working for me. Below is the code for it which i am using by replacing local variables with rule input.&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;a!dropdownField(
    		label: &amp;quot;Product Group Affected&amp;quot;,
    		labelPosition: &amp;quot;ABOVE&amp;quot;,
    		placeholderLabel: &amp;quot;--- Select a Value ---&amp;quot;,
    		choiceLabels: cons!CCCProductGroupAffectedOptions,
    		choiceValues: cons!CCCProductGroupAffectedOptions,
    		value: ri!CCC.ProductGroupAffected,
    		saveInto: {
      		ri!CCC.ProductGroupAffected,
    		/* the below will clear the previous Tools Affected Selection when the Product Group Affected is changed */
              		a!save(
                		ri!CCC.ToolsAffected,
                		{}
              		)
             		},
    		validations: {}
  		),
		
  		a!checkboxField(
    		label: &amp;quot;Tools Affected&amp;quot;,
    		labelPosition: &amp;quot;ABOVE&amp;quot;,
        choiceLabels: rule!CCCToolsAffectedOptions(ri!CCC.ProductGroupAffected),
        choiceValues: rule!CCCToolsAffectedOptions(ri!CCC.ProductGroupAffected),
    		value: ri!CCC.ToolsAffected,
    		saveinto: ri!CCC.ToolsAffected,  
        /*ChoiceLayout: &amp;quot;COMPACT&amp;quot;,/*STACKED*/
    		showwhen: not(isnull(ri!CCC.ProductGroupAffected)),
    		validations: {}
    		),
			a!columnsLayout(
			columns: a!forEach(
				ri!CCC.ToolsAffected,
				with(
					local!currentIndex: wherecontains(
					fv!item,
					touniformstring(property(ri!CCC.NodesAffected, &amp;quot;Tool&amp;quot;, {}))
				),
		
        a!columnLayout(
					contents: {
          	a!checkboxField(
              label: &amp;quot;Nodes Affected for : &amp;#39;&amp;quot; &amp;amp; fv!item &amp;amp; &amp;quot;&amp;#39;&amp;quot;,
              labelPosition: &amp;quot;ABOVE&amp;quot;,
              /*instructions: &amp;quot;current index: &amp;quot; &amp;amp; local!currentIndex,*/
              choiceLabels: cons!CCCNodesAffectedOptions,
              choiceValues: cons!CCCNodesAffectedOptions,
              value: tointeger(
              property(
                  index(
                    ri!CCC.NodesAffected,
                    local!currentIndex,
                    null()
                   ),
                   &amp;quot;Nodes&amp;quot;,
                   null()
                 )
               ),
               saveInto: {
                 a!save(
                   ri!CCC.NodesAffected,
                     append(
                       if(isnull(local!currentIndex),
                         ri!CCC.NodesAffected,
                         remove(ri!CCC.NodesAffected, local!currentIndex)
                        ),
                        if(
                            rule!APN_isEmpty(save!value),
                            /* indicates all size choices have been de-selected, so we&amp;#39;ll save an empty set here to remove this menu choice from the saved data set */
                            {},
                            {
                              Tool: fv!item,
                              Nodes: save!value
                            }
                          )
        							)
      						)
    						}
  						)
    				}
  				)
  			)
  		),
		  showwhen: not(isnull(ri!CCC.ProductGroupAffected))
		),
	&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;I am using a interface input named CCC of type CDT. To get the checkbox values Tools Affected and Nodes Affected i have made as an Array.&lt;/p&gt;
&lt;p&gt;&lt;a href="/cfs-file/__key/communityserver-discussions-components-files/13/3.PNG"&gt;&lt;img src="/resized-image/__size/320x240/__key/communityserver-discussions-components-files/13/3.PNG" alt=" " /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Let me know if you need any other information. I tried a lot to debug the issue but wasn&amp;#39;t able to figure out and looking for help.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to create conditional checkbox ?</title><link>https://community.appian.com/thread/48128?ContentTypeID=1</link><pubDate>Wed, 30 Aug 2017 14:14:44 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:4eada103-f5a6-4488-bae8-beb0db54ba09</guid><dc:creator>Mike Schmitt</dc:creator><description>I really can&amp;#39;t help much more if you can&amp;#39;t give me some further details about your exact configuration including screenshots of your SAIL rule input configurations, etc.  Have you tried reverting to the working code I&amp;#39;d posted, and try replacing local variables with Rule Inputs one at a time and making sure it works at each step?&lt;br /&gt;
&lt;br /&gt;
Also, you need to get familiar with the support documentation available here - for example the property function is described here: &lt;a href="https://docs.appian.com/suite/help/17.2/fnc_scripting_property.html"&gt;docs.appian.com/.../fnc_scripting_property.html&lt;/a&gt; -- in short, the property() function is used to extract a &amp;quot;property&amp;quot; (as in &amp;quot;dot property&amp;quot;) from a CDT or Dictionary, in a safe manner such that a default output can be returned if the property doesn&amp;#39;t exist (i.e. if ri!myUser.firstName doesn&amp;#39;t exist, property(ri!myUser, &amp;quot;firstName&amp;quot;, &amp;quot;none&amp;quot;) will return &amp;quot;none&amp;quot;).&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to create conditional checkbox ?</title><link>https://community.appian.com/thread/48121?ContentTypeID=1</link><pubDate>Wed, 30 Aug 2017 12:40:21 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:f1b529d3-d972-45b7-b7d9-566b34e3e045</guid><dc:creator>prais1852</dc:creator><description>Hi   It works only when i click all the checkboxes before page reloads with selected options. I checked on the interface also. The values are getting inserted in the interface input but once i click on any other text field of my form the checkbox selection gets removed.&lt;br /&gt;
&lt;br /&gt;
If you can explain the use of property() in your code then that will also be very helpful. I am not getting the idea why you have used property method.&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to create conditional checkbox ?</title><link>https://community.appian.com/thread/48119?ContentTypeID=1</link><pubDate>Wed, 30 Aug 2017 12:29:18 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:61f64e52-3e7d-4899-8315-2dd85ffde5a3</guid><dc:creator>prais1852</dc:creator><description>Hi   on saving values in rule input it is not working compared to the above code written by you. Is there any other way to store the data with item &amp;amp; sizes pair ?&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to create conditional checkbox ?</title><link>https://community.appian.com/thread/47661?ContentTypeID=1</link><pubDate>Wed, 16 Aug 2017 19:38:24 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:a7b0b19d-68b6-424e-a56e-1026592b90ab</guid><dc:creator>prais1852</dc:creator><description>&lt;p&gt;My problem is same as earlier. Still if i click one of the Nodes Affected ( Product Sizes in earlier examples ) and then select the some other from list of checkboxes, my previous selection gets removed. However it is working fine for the code you mentioned above using local variables but not working with rule inputs.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to create conditional checkbox ?</title><link>https://community.appian.com/thread/47660?ContentTypeID=1</link><pubDate>Wed, 16 Aug 2017 19:34:55 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:531b0763-04aa-4843-8a85-06dc6564aab6</guid><dc:creator>Mike Schmitt</dc:creator><description>I don&amp;#39;t really need an XSD, just maybe a description of how some of the CDT properties you&amp;#39;re using are configured (such as NodesAffected for instance), or maybe a screenshot.  And also you didn&amp;#39;t mention what error you&amp;#39;re getting.&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to create conditional checkbox ?</title><link>https://community.appian.com/thread/47659?ContentTypeID=1</link><pubDate>Wed, 16 Aug 2017 19:34:37 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:03504d16-c0df-4fcc-be4d-35a04a040f9d</guid><dc:creator>prais1852</dc:creator><description>&lt;p&gt;Here is the XSD of the CDT -&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;&amp;lt;xsd:schema xmlns:xsd=&amp;quot;http://www.w3.org/2001/XMLSchema&amp;quot; xmlns:tns=&amp;quot;urn:com:appian:types:CCCD&amp;quot; targetNamespace=&amp;quot;urn:com:appian:types:CCCD&amp;quot;&amp;gt;
  &amp;lt;xsd:complexType name=&amp;quot;CCC_Details&amp;quot;&amp;gt;
    &amp;lt;xsd:annotation&amp;gt;
      &amp;lt;xsd:documentation&amp;gt;&amp;lt;![CDATA[Information]]&amp;gt;&amp;lt;/xsd:documentation&amp;gt;
    &amp;lt;/xsd:annotation&amp;gt;
    &amp;lt;xsd:sequence&amp;gt;
      &amp;lt;xsd:element name=&amp;quot;CCCNumber&amp;quot; nillable=&amp;quot;true&amp;quot; type=&amp;quot;xsd:int&amp;quot;&amp;gt;
        &amp;lt;xsd:annotation&amp;gt;
          &amp;lt;xsd:appinfo source=&amp;quot;appian.jpa&amp;quot;&amp;gt;@Id @GeneratedValue&amp;lt;/xsd:appinfo&amp;gt;
        &amp;lt;/xsd:annotation&amp;gt;
      &amp;lt;/xsd:element&amp;gt;
      &amp;lt;xsd:element name=&amp;quot;Approved&amp;quot; nillable=&amp;quot;true&amp;quot; type=&amp;quot;xsd:string&amp;quot;&amp;gt;
        &amp;lt;xsd:annotation&amp;gt;
          &amp;lt;xsd:appinfo source=&amp;quot;appian.jpa&amp;quot;&amp;gt;@Column(length=50)&amp;lt;/xsd:appinfo&amp;gt;
        &amp;lt;/xsd:annotation&amp;gt;
      &amp;lt;/xsd:element&amp;gt;
      &amp;lt;xsd:element name=&amp;quot;ApprovalDate&amp;quot; nillable=&amp;quot;true&amp;quot; type=&amp;quot;xsd:date&amp;quot; /&amp;gt;
      &amp;lt;xsd:element name=&amp;quot;PRNumber&amp;quot; nillable=&amp;quot;true&amp;quot; type=&amp;quot;xsd:int&amp;quot; /&amp;gt;
      &amp;lt;xsd:element name=&amp;quot;ProductGroupAffected&amp;quot; nillable=&amp;quot;true&amp;quot; type=&amp;quot;xsd:string&amp;quot; /&amp;gt;
      &amp;lt;xsd:element maxOccurs=&amp;quot;unbounded&amp;quot; minOccurs=&amp;quot;0&amp;quot; name=&amp;quot;ToolsAffected&amp;quot; nillable=&amp;quot;true&amp;quot; type=&amp;quot;xsd:string&amp;quot; /&amp;gt;
      &amp;lt;xsd:element maxOccurs=&amp;quot;unbounded&amp;quot; minOccurs=&amp;quot;0&amp;quot; name=&amp;quot;NodesAffected&amp;quot; nillable=&amp;quot;true&amp;quot; type=&amp;quot;xsd:string&amp;quot; /&amp;gt;
      &amp;lt;xsd:element name=&amp;quot;ApprovedBy&amp;quot; nillable=&amp;quot;true&amp;quot; type=&amp;quot;xsd:string&amp;quot;&amp;gt;
      
      &amp;lt;xsd:element name=&amp;quot;Bundled&amp;quot; nillable=&amp;quot;true&amp;quot; type=&amp;quot;xsd:string&amp;quot;&amp;gt;
        &amp;lt;xsd:annotation&amp;gt;
          &amp;lt;xsd:appinfo source=&amp;quot;appian.jpa&amp;quot;&amp;gt;@Column(length=5)&amp;lt;/xsd:appinfo&amp;gt;
        &amp;lt;/xsd:annotation&amp;gt;
      &amp;lt;/xsd:element&amp;gt;
      &amp;lt;xsd:element name=&amp;quot;CreatedBy&amp;quot; nillable=&amp;quot;true&amp;quot; type=&amp;quot;xsd:string&amp;quot;&amp;gt;
        &amp;lt;xsd:annotation&amp;gt;
          &amp;lt;xsd:appinfo source=&amp;quot;appian.jpa&amp;quot;&amp;gt;@Column(length=100)&amp;lt;/xsd:appinfo&amp;gt;
        &amp;lt;/xsd:annotation&amp;gt;
      &amp;lt;/xsd:element&amp;gt;
      &amp;lt;xsd:element name=&amp;quot;CreatedOn&amp;quot; nillable=&amp;quot;true&amp;quot; type=&amp;quot;xsd:dateTime&amp;quot; /&amp;gt;
      &amp;lt;xsd:element name=&amp;quot;UpdatedBy&amp;quot; nillable=&amp;quot;true&amp;quot; type=&amp;quot;xsd:string&amp;quot;&amp;gt;
        &amp;lt;xsd:annotation&amp;gt;
          &amp;lt;xsd:appinfo source=&amp;quot;appian.jpa&amp;quot;&amp;gt;@Column(length=100)&amp;lt;/xsd:appinfo&amp;gt;
        &amp;lt;/xsd:annotation&amp;gt;
      &amp;lt;/xsd:element&amp;gt;
      &amp;lt;xsd:element name=&amp;quot;UpdatedOn&amp;quot; nillable=&amp;quot;true&amp;quot; type=&amp;quot;xsd:dateTime&amp;quot; /&amp;gt;
    &amp;lt;/xsd:sequence&amp;gt;
  &amp;lt;/xsd:complexType&amp;gt;
&amp;lt;/xsd:schema&amp;gt;&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to create conditional checkbox ?</title><link>https://community.appian.com/thread/47657?ContentTypeID=1</link><pubDate>Wed, 16 Aug 2017 19:31:18 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:5c3c7fc9-3d23-4dad-b59a-40f69c0c932d</guid><dc:creator>prais1852</dc:creator><description>I am using a CDT for this rule input. Do you need XSD of that CDT ?&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to create conditional checkbox ?</title><link>https://community.appian.com/thread/47656?ContentTypeID=1</link><pubDate>Wed, 16 Aug 2017 19:22:35 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:84df136b-3c98-4183-a85e-cd33713d8d1e</guid><dc:creator>Mike Schmitt</dc:creator><description>Can you share the configuration of ri!CCC?&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to create conditional checkbox ?</title><link>https://community.appian.com/thread/47652?ContentTypeID=1</link><pubDate>Wed, 16 Aug 2017 18:28:46 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:cf940597-3850-443c-b3dd-cd043a59b943</guid><dc:creator>prais1852</dc:creator><description>&lt;p&gt;I have problem with rule Inputs when i am translating the code for Rule Inputs. Here is the part of code that i am using for my application and looking for the explanation of this part of answer suggested by you -&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;a!columnsLayout(
			columns: a!forEach(
				ri!CCC.toolsaffected,
				with(
					local!currentIndex: wherecontains(
					fv!item,
					touniformstring(property(ri!CCC.NodesAffected, &amp;quot;item&amp;quot;, {}))
				),
		
        a!columnLayout(
					contents: {
          	a!checkboxField(
              label: &amp;quot;Nodes Affected for : &amp;#39;&amp;quot; &amp;amp; fv!item &amp;amp; &amp;quot;&amp;#39;&amp;quot;,
              labelPosition: &amp;quot;ABOVE&amp;quot;,
              /*instructions: &amp;quot;current index: &amp;quot; &amp;amp; local!currentIndex,*/
              choiceLabels: {&amp;quot;1262&amp;quot;, &amp;quot;1264&amp;quot;, &amp;quot;1266&amp;quot;,&amp;quot;1268&amp;quot;,&amp;quot;1270&amp;quot;,&amp;quot;1272&amp;quot;,&amp;quot;1274&amp;quot;,&amp;quot;1276&amp;quot;},
              choiceValues: {1262, 1264, 1266, 1268, 1270, 1272, 1274, 1276},
              value: tointeger(
              property(
                  index(
                    ri!CCC.NodesAffected,
                    local!currentIndex,
                    null()
                   ),
                   &amp;quot;nodes&amp;quot;,
                   null()
                 )
               ),
               saveInto: {
                 a!save(
                   ri!CCC.NodesAffected,
                     append(
                       if(isnull(local!currentIndex),
                         ri!CCC.NodesAffected,
                         remove(ri!CCC.NodesAffected, local!currentIndex)
                        ),
                        if(
                            rule!APN_isEmpty(save!value),
                            /* indicates all size choices have been de-selected, so we&amp;#39;ll save an empty set here to remove this menu choice from the saved data set */
                            {},
                            {
                              item: fv!item,
                              nodes: save!value
                            }
                          )
        							)
      						)
    						}
  						)
    				}
  				)
  			)
  		),
		  showwhen: not(isnull(ri!CCC.ProductGroupAffected))
		),
	&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to create conditional checkbox ?</title><link>https://community.appian.com/thread/47646?ContentTypeID=1</link><pubDate>Wed, 16 Aug 2017 16:26:26 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:fed340c4-13a1-4527-9262-19e8934adce5</guid><dc:creator>Mike Schmitt</dc:creator><description>Do you mean you&amp;#39;re having trouble getting it to work in a task, or just when trying to convert some of the local variables to rule inputs instead?  Can you provide a little more detail about the setup you&amp;#39;ve done and what&amp;#39;s going wrong?  And which code are you referring to that you need an explanation on?&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to create conditional checkbox ?</title><link>https://community.appian.com/thread/47645?ContentTypeID=1</link><pubDate>Wed, 16 Aug 2017 16:19:53 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:39014226-ca36-4682-88ab-43a895ddf23c</guid><dc:creator>prais1852</dc:creator><description>Hi   Your code worked with local variables but i am getting problem when trying to save value in Rule input (ri!) fields. Could you please explain what your functions are trying to do in 2nd parameter (expression) of a!ForEach() ?&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to create conditional checkbox ?</title><link>https://community.appian.com/thread/47447?ContentTypeID=1</link><pubDate>Tue, 08 Aug 2017 16:04:11 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:a5862648-eb37-4f24-b831-2a743eaf7488</guid><dc:creator>Mike Schmitt</dc:creator><description>&lt;p&gt;I was able to get it working - basically it required somewhat different handling of the local variable being used to store sizes, storing it as an array instead of a singular in the local dictionary, and special handling for when the user de-selects back down to the empty set.&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;load(

  local!restaurantChoices: {
    {id: 1, name: &amp;quot;KFC&amp;quot;}, 
    {id: 2, name: &amp;quot;Pizza Hut&amp;quot;}
  },
  local!selectedRestaurant,
  local!menuSelection: {},
  
  /* set up Menu Selection Sizes to be an array of dictionary -
    the CDT would resemble {item: &amp;quot;item name&amp;quot;, size: sizeId} */
  local!menuSelectionSizes: {},
  
  with(
    
    /* dynamically set the menu choices based on which restaurant is picked */
    local!menuChoices: if(
      isnull(local!selectedRestaurant),
      {},
      if(
        tointeger(local!selectedRestaurant) = 1,
        {
          &amp;quot;Fried Chicken&amp;quot;, &amp;quot;Mashed Potatoes&amp;quot;, &amp;quot;Cole Slaw&amp;quot;, &amp;quot;Biscuits&amp;quot;, &amp;quot;Gravy&amp;quot;
        },
        if(
          tointeger(local!selectedRestaurant) = 2,
          {
            &amp;quot;Pizza&amp;quot;, &amp;quot;Bread Sticks&amp;quot;, &amp;quot;Salad Bar&amp;quot;, &amp;quot;Soft Drinks&amp;quot;
          },
          {}
        )
      )
    ),
    
    a!formLayout( 
    /* now assuming 17.2 or newer */
      
      contents: {
        a!radioButtonField(
          label: &amp;quot;Chain:&amp;quot;,
          labelPosition: &amp;quot;ADJACENT&amp;quot;,
          choiceLabels: local!restaurantChoices.name,
          choiceValues: local!restaurantChoices.id,
          value: local!selectedRestaurant,
          saveInto: {
            local!selectedRestaurant,
            
            /* the below will clear the previous menu selection when the restaurant is changed */
            a!save(
              local!menuSelection,
              {}
            )
          }
        ),
        
        if(
          not(isnull(local!selectedRestaurant)),
          a!checkBoxField(
            label: &amp;quot;Make your food choices:&amp;quot;,
            labelPosition: &amp;quot;ADJACENT&amp;quot;,
            choiceLabels: local!menuChoices,
            choiceValues: local!menuChoices,
            value: local!menuSelection,
            saveInto: {
              a!save(
                local!menuSelection,
                /* this weird saveInto style will attempt to keep the saved value array in the same order as the
                initial checkboxes, since Appian versions 17.1 and later no longer do this automatically */
                index(
                  local!menuChoices,
                  whereContains(
                    save!value,
                    local!menuChoices
                  )
                )
              )
            }
          ),
          {}
        ),
        a!columnsLayout(
          columns: a!forEach(
            local!menuSelection,
            with(
              local!currentIndex: wherecontains(
                fv!item,
                touniformstring(property(local!menuSelectionSizes, &amp;quot;item&amp;quot;, {}))
              ),
              a!columnLayout(
                contents: {
                  a!checkboxField(
                    label: &amp;quot;Select Size: &amp;#39;&amp;quot; &amp;amp; fv!item &amp;amp; &amp;quot;&amp;#39;&amp;quot;,
                    labelPosition: &amp;quot;ABOVE&amp;quot;,
                    choiceLabels: {&amp;quot;Small&amp;quot;, &amp;quot;Medium&amp;quot;, &amp;quot;Large&amp;quot;},
                    choiceValues: {1, 2, 3},
                    value: tointeger(
                      property(
                        index(
                          local!menuSelectionSizes,
                          local!currentIndex,
                          null()
                        ),
                        &amp;quot;sizes&amp;quot;,
                        null()
                      )
                    ),
                    saveInto: {
                      a!save(
                        local!menuSelectionSizes,
                        append(
                          if(
                            isnull(local!currentIndex),
                            local!menuSelectionSizes,
                            remove(local!menuSelectionSizes, local!currentIndex)
                          ),
                          if(
                            apn_isEmpty(save!value),
                            /* indicates all size choices have been de-selected, so we&amp;#39;ll save an empty set here to remove this menu choice from the saved data set */
                            {},
                            {
                              item: fv!item,
                              sizes: save!value
                            }
                          )
                        ) 
                      )
                    }
                  )
                }
              )
            )
          )
        ),
        
        /*a!paragraphField(*/
          /*label: &amp;quot;debug&amp;quot;,*/
          /*value: local!menuSelectionSizes*/
        /*),*/
        
        {}
      } 
    )
  )
)&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>