7 Replies Latest reply on Dec 5, 2008 1:47 AM by tatami

    Searching via radio button field



      Searching via radio button field


      I have a large database. The records contain several fields with radio buttons. For example, one field allows me to rate the item described in each record. When I try to search for items with a particular rating, the search returns all the items I've rated, not those I've rated with a particular score. Please could somebody tell me what's going on here and what I need to do to rectify the situation.

        • 1. Re: Searching via radio button field



          Thank you for your post.


          A radio button field allows you to select a specific value for a field.  When you go to Find mode and select a radio button and find, FileMaker will look for that value in the field.  If that value is a subset of another value, then those records will also be displayed.  For example, suppose your radio buttons contain the values:







          If you select the value for "Smith", it will search for "Smith" in that field.  Therefore, "Smithers" and "Smithereens" will also be displayed.  The records for "Johnson" will not be displayed.


          If this isn't the case, then please let me know the field, the field type, and the value list, and I'll try to duplicate the problem here.



          FileMaker, Inc. 

          • 2. Re: Searching via radio button field
               Thanks for your incredibly prompt and very helpful reply. The rating field I'm having problems with has five categories that run from * to ***** so you've absolutely identified the cause of the problem. Can you suggest a solution? If I simply rechristen the radio buttons 1, 2, 3, 4 and 5 will that work?
            • 3. Re: Searching via radio button field



              Yes, you can rename the radio buttons from 1 to 5, but it will not replace the existing values!  Therefore, I would first change the value list to INCLUDE 1, 2, 3, 4 and 5.  That is, the value list should now look like:













              Unfortunately, you'll have to go back into each record, and change the asterisk selection to the appropriate number value.   Once through, then you can edit the value list and remove the asterisks.



              FileMaker, Inc. 

              • 4. Re: Searching via radio button field
                   Is there no way to avoid having to manually change the selection in each record? I have almost 3,000 records so this would be a huge and unbelievably tedious undertaking :-(
                • 5. Re: Searching via radio button field



                  Yikes!  I agree manually would be out of the question.  Therefore, do the following:


                  1. Create a new layout that only displays the rating field.  However, do not format it for radio buttons.  That is, leave it as a standard field.


                  2. Create a new calculation field, "LENGTH", resulting in Number, with the formula:

                  Length ( <radio button field> )


                  That is, put the name of your radio button field in parentheses.  When finished, click OK.


                  3. Make sure LENGTH is now on this new layout.


                  4. Go to Browse mode, and you will see that the records with one asterisk have a length of 1, the records with 2 asterisks have a length of 2.


                  5. Find all records where LENGTH is greater than zero.  That is, go into Find mode, enter: >0

                  ... in the LENGTH field and press return.


                  6. Put your cursor in the radio button field, pull down the Records menu and select "Replace Field Contents...".  Select the last radio button "Replace with calculated result:", and you'll be taken to another dialog box.  Double-click on the LENGTH field above so it appears in the large calculation area and click "OK".  Click "Replace", and all of the entries with asterisks will be replaced with numbers.


                  7. Change your value list from asterisks to the numbers.


                  8. Go back to your original layout, and you should now see radio buttons next to the values.


                  9. Once satisfied, you can remove the new layout AND the LENGTH field.


                  If you run into any difficulties, please let me know.


                  The reason in step #5 to only find those records with a value greater than 0 is that I didn't want to put zero into the original field.  Does that make sense? 



                  FileMaker, Inc. 

                  • 6. Re: Searching via radio button field
                       Thanks for another helpful reply. It's getting late here in the UK so I'm going to wait to try out your solution until I'm fresh and I've got some spare time to really concentrate. Once I've had a go I'll get back to you and let you know how I got on. In the meanwhile, though, thanks again and I'll leave you in peace.
                    • 7. Re: Searching via radio button field
                         It worked perfectly. Thanks again for the terrific support. Problem definitively solved and useful lesson learned.