7 Replies Latest reply on Mar 26, 2013 10:54 AM by philmodjunk

    Selecting by radio button value!

    artdoc

      Title

      Selecting by radio button value!

      Post

           I'm stymied. I need to pull out records marked as "Open" with a radio button set. I've tried all the options I can think of, from using a variable to creating a second field (redundant~) to simply fill in "Open" as a calculated value from the radio button chosen, searching on that. Nothing pulls up a list of ONLY the open records from 19,000+ collection.

           a I must be missing something really obvious, but I am missing it.

            

           Any good ideas?

            

           Thanks,

            

           Steve

        • 1. Re: Selecting by radio button value!
          philmodjunk

               Make sure that your radio button field is of type text.

          • 2. Re: Selecting by radio button value!
            artdoc

                 Well, more confusion (for me!) because my radio buttons are a text field, and my second field (statauFlag) is a calculation but result is text also. I just verified this, tried a find command once more, got zero hits!

                 I know this is possible, I'm just lost inb a fog.

            • 3. Re: Selecting by radio button value!
              philmodjunk

                   We'd need to know more.

                   If your field stores single values as is expected for a field formatted with radio buttons, you should be able to:

                   Enter Find Mode

                   Click a radio button

                   Perform the find

                   and all fileds with that button selected should be found.

                   In a script it would be must the same, but you'd use set field to assign the value to the radio button field instead of clicking it.

                   There is one issue that can catch a new user by surprise:

                   If you change the value list to show different values for a radio button or checkbox formatted field, the values previously entered into the field remain unchanged, but the new values--which will be shown as unselected, will hide the current data in the field.

                   Thus, if you think that there is any possibility that this is the issue, you might take a copy of this field and return it to edit box formatting so that you can inspect the data in the field.

              • 4. Re: Selecting by radio button value!
                artdoc

                     I have tried what seems so obvious: Do a find, click the OPEN button choice, and nothing found. So I set a variable for $open and then tried set field (in the find more) to find Sopen, then =$open (failed), and yes, while I did initially have two options (open, closed) I did add a thirtd (active), but even now when I simply convert the radio button field to an edit field, onbly the cuttent choice shows in the field!I thought I had recently found a Fet( function that would collect records with Item 1 selected. Now of course I can't find any such thing when I try to rediscover what I thought was a potential.

                     More baffeling? I was pretty sure I had this search working yesterday! Out of 19,000+ records I was in fact finding some 500 with  "OPEN" status. Today? NO such luck. I didn't change anything.

                     I do have status repeated on two layouts, but my searches are all conducted in the main layout of interest (I am revising a database that was set up by a company, so two status fields trying to do the same thing!). I guess I could remove the extra field, but...

                • 5. Re: Selecting by radio button value!
                  philmodjunk

                       Do a find, click the OPEN button choice, and nothing found.

                       Apologies in advance, but just to be sure, you mean:

                       Click the find button

                       Click the radio button

                       Click the Perform find button

                       and no records are found even though you can find records that show this button as selected?

                       Or do you get a found set of all records?

                       If you enter layout mode and select the radio button field, Does the text shown to the left of :: in "Display Data From" on the Inspector's data tab exactly match the text selected in "Show Records From" in Layout Setup...? (This text also appears to the right of "Table:" in the status area when you are in layout mode.

                  • 6. Re: Selecting by radio button value!
                    artdoc

                         Okay, this is funny . Guided by your questions, I poked a liitle more and discovered that I had put a SORT script trigger into the layout! Result? My sort requests were workingbut as the soet script returned the original layout, it triggered a Show All and aort by date: presto! 19,000 records nicely sotred, OPEN and CLOSED all together.

                         D'oh! I removed that trigger, built a new scipt to find OPEN and Voila!, 500+ found records. I wasn't imagining that I had seen t work yesterday, I just forgot that onload script trigger. Now I have two new buttons to let the customer choose all or open records.

                         But thanks for the feedback; it's still helpful.

                          

                         Steve

                    • 7. Re: Selecting by radio button value!
                      philmodjunk

                           One habit I have developed with the advent of script triggers is to enclose most "layout level" script trigger controlled scripts in an If step like this:

                           If [ Not $$TriggersOff ]

                              # Put rest of script here

                           End IF

                           Then I can disable the script trigger by setting $$TriggersOff to True. This gives me a way for scripts to change layouts, change records, etc without tripping any triggers that might interfere with my script or even just slow it down with uneeded processing.