6 Replies Latest reply on Dec 16, 2013 1:46 PM by dgupta

    Checkbox Issue



      Checkbox Issue



           I am having an issue with checkboxes.  I have a checkbox with three options.  If the first is checked then I need to ensure that the second option is definitely not checked.  I was trying to write a script using 'if' and 'set field' but can't see how to reference the second option in the script, to set it to '0'.

           Many thanks in advance for your help.




        • 1. Re: Checkbox Issue

               Set up an On Object Modify script trigger, to execute the following script.

               If [not IsEmpty ( FilterValues ( table::CheckBoxField ; "First" ) ) ]
                   Set Field [ table::CheckBoxField ; Substitute ( table::CheckBoxField ; "Second" ; "" ) ]
               End If

               However, If you have value in the list that includes the same characters as the field in the substitute function, that will get unchecked as well. So as long as they're entirely different this will work, but there may be a better way. (See PhilModJunk's comment in boolean statement help)

          • 2. Re: Checkbox Issue

                 You may want to put this in two fields. Give the first field a radio button format for selecting either the first or second field, but not both and make the second field a single value check box for selecting the third value.

            • 3. Re: Checkbox Issue

                   Thank you, I will give these solutions a go.


              • 4. Re: Checkbox Issue

                     Dear Phil_1986

                     I could not quite get the script you suggested to work: have a look at the image...please let me know what I am doing wrong.

                • 5. Re: Checkbox Issue

                       When Setting up Set Field, there are two Specify buttons that must be clicked. To get Set Field [Table::Field ; Expression], add set field to your script and click the first button (specify target field). Select Table::Field from the list of fields. Do not click the specify button next to the repetition box. Click OK to close this dialog box. Now click the lower specify button (calculated result) and create the expression to the right of the semicolon (;). Do not try to type in the semicolon.

                  • 6. Re: Checkbox Issue

                         Thank you for explaining that.  The script works fine.