1 2 Previous Next 17 Replies Latest reply on Oct 22, 2012 3:23 PM by philmodjunk

    Script Problem

    Epa

      Title

      Script Problem

      Post

           I'm having a problem with my search box.  When I type in a Contacts Name, sometimes it finds and displays the contact and sometimes it shows all contacts, despite correctly typing in a name.  This is a layout in list view.  This only occurs on the Desktop layout.  It works flawlessly on the iPad Layout.  Same field, same script, same value lists.  Can't figure it out.  Please help.

      Snapshot_10%3A19%3A12_11%3A26_AM.png

        • 1. Re: Script Problem
          philmodjunk

               I would guess that if you open layout setup on the two layouts, you won't find the same exact table occurrence name selected in the "show records from" dialog.

               Either that, or some of the fields you need quick find to search are either missing from the layout or excluded from quick finds.(Quick find can be disabled for a given field or for the entire layout if you select that option in layout setup...)

          • 2. Re: Script Problem
            Epa

                  

                 I would guess that if you open layout setup on the two layouts, you won't find the same exact table occurrence name selected in the "show records from" dialog.

                 They both have the same table occurrence: "Contacts"

                  

                 Either that, or some of the fields you need quick find to search are either missing from the layout or excluded from quick finds.(Quick find can be disabled for a given field or for the entire layout if you select that option in layout setup...)

                 I have quick find enabled for the first and last name fields as well as the calc field where first and last fields are merged as one.  I keep going through the layout but its not working.  Is it possible my database is corrupt?

            • 3. Re: Script Problem
              philmodjunk

                   Is contacts::quickfind | iOS on both layouts?

                   I just double checked th 400 error code and you get a find all records in your script if there is no data in the quick find's field. If you don't have that field on the layout where this is not working, you may be entering quick find criteria into the wrong field--leaving the quickfind | iOS field empty.

              • 4. Re: Script Problem
                Epa

                     for the Quickfind | iOS field: I am displaying data from Contacts::Quickfind | iOS, drop down list; value list: get values from the Contacts::Contact name field which is a field that merges first and last names....

                     My Search box works for some of my contacts in the list.  I can click on a contact from my dropdown list and sometimes it doesn't find it.  But it is consistent, meaning it will always find certain contacts and always not find others,

                • 5. Re: Script Problem
                  philmodjunk

                       You might try rebuilding your field indexes. Sometimes a damaged index will produce unpredictable find results.

                       Close your file if it is open.

                       Launch FileMaker if it is not already launched without opening the file.

                       Select Recover.

                       Select the Advanced Recovery option and choose only "Copy file blocks as is" and "Rebuild Field Indexes".

                       Test your recovered copy (which is identical to the original except for the rebuilt field indexes), to see if the script now produces consistent results.

                  • 6. Re: Script Problem
                    Epa

                         Just tried that.  I closed the file from my server and downloaded to my desktop, rebuilt the indexes.....same result.  This is making me nuts.  It is saying 188 Records found when I type in the name "Doe" when there clearly is "Doe, John" listed in the value list, as well as on my layout.  All settings are the same and it only happens on the desktop layout.

                    • 7. Re: Script Problem
                      philmodjunk

                           are the same fields being searched on both layouts?

                           Are they text fields?

                           I'm grasping at straws here also...

                      • 8. Re: Script Problem
                        Epa

                             Exactly the same.  Quickfind | iOS is a global field.  Contact Name is a calculated field that pulls the first and last name fields together and is being used as the value list.  Contact Name is also on the layout.

                        • 9. Re: Script Problem
                          philmodjunk

                               If you perform the quick find manually from the toolbar instead of using your script, do you get the same inconsistent results?

                               Do you have FileMaker Advanced?

                          • 10. Re: Script Problem
                            Epa

                                 Yes, and I just went through most of my contacts, seems like only 10% are affected.  0% affected on my iPad layout.

                            • 11. Re: Script Problem
                              philmodjunk

                                   If you get the same results from a manual quick find, then the issue does not lie with your script.

                              • 12. Re: Script Problem
                                Epa

                                     Ok, I don't know where else to look.  Weird thing is, it is finding all my contacts when I search for certain names......It would make more sense if it didn't find anything, wouldn't it?

                                • 13. Re: Script Problem
                                  philmodjunk

                                       Try this experiment and see what happens:

                                       Create a brand new blank layout based on the same problem table occurrence. Using the field tool from the toolbar, add just the fields you need for your quick find. Do not copy any layout objects from the problem layout.

                                       Try a manual quick find using the control in the toolbar.

                                       Do you get the same results?

                                       If this works, then either there is some setting in your layout that we have missed, or your layout is damaged.

                                  • 14. Re: Script Problem
                                    Epa

                                         Created a new layout and it worked fine.  My Database is live on the server.  I'd hate to have to take it down, recreate a new layout.....

                                         Has anyone ever had this issue?

                                    1 2 Previous Next