AnsweredAssumed Answered

How to script the setting of all values in a checkbox set?

Question asked by disabled_JustinClose on Nov 9, 2012
Latest reply on Nov 9, 2012 by hbrendel

Title

How to script the setting of all values in a checkbox set?

Post


     I am trying to figure out a script that will set all of the values for a checkbox set to On.  I have a button on a layout that I want to use to toggle all of the checkboxes to ON, and also OFF.  (The OFF part is fairly simple:  just set the target field to empty.)

     But for toggling them all ON, I would need to copy the values of the value-list to the target field.  (The value lists are generally 5-6 items of text each, and I want to implement this for 4-5 lists.)  If the value list is defined as 'Custom Values' they aren't really available to copy into the field, are they?  If they are defined to a field, then I could copy the field (not how it is currently configured, though).

     Or, the much larger scheme would be to create a table with the values of the list as individual records, with a ListName field to group by.  Then I could copy that...pretty straightforward with an ExecuteSQL statement; since I am doing this in a script I can hardcode the names (or rather, assign them as parameters to the script call).  OK, but then I would have to figure out how to create the value list to create the normal human-interface for checking individual boxes on the layout.  I wouldn't want to maintain two systems.  I wouldn't really like to make a bunch of relationships and TOs, either. 

     I just want it all.  :)

      

     --  J

Outcomes