2 Replies Latest reply on Sep 21, 2012 11:21 AM by Terri

    Check Box Question



      Check Box Question


           I have a value list called Reviewed (Yes/No) which on my layout I have as a checkbox set. In reality all I need is one checkbox that indicates if a records has been reviewed. Eventually I will need a script to find records that this checkbox is NOT checked.
           Question 1: Do I still create a value list called Reviewed and only give it a Yes value?
           Question 2: How do I find records where this box is NOT checked?

        • 1. Re: Check Box Question

               1) you can do that with no problem. Some developers set such a single value check box to enter the number 1 and then resize the field and add "yes" as layout text. A number field with 1 in it sometimes makes for slightly more elegant scripts and summary calculations.

               2) A field that does not have a value selected will be empty. To find a record where a field is empty, put an "=" in the field as your search criterion.

               In a script, it might look like this:

               Enter Find mode [] --> clear the pause check box
               Set Field [YourTable::checkboxField ; "="]
               Set error capture[on]
               Perform Find []

               But excercise caution when changing the list of values in a value lists such as changing a two value list from Yes, No to just "yes". changing the values in the value list changes what check boxes are displayed, but does not alter the values stored in any existing records. Thus, a field with "No" selected will look like it is empty once "No" has been removed from the value list, but that text will still be present in the field even though it is no long visible and that will affect the results of your finds that search on this field.

          • 2. Re: Check Box Question

                 Thank you, Phil. You have been more than helpful today. I know most of these questions can be answered by searching the forum or by reviewing the book I have but I'm still under that tight deadline. I appreciate your quick and easy-to-follow responses.