10 Replies Latest reply on Aug 18, 2015 3:32 PM by philmodjunk

    Find Script: Issue with find criteria



      Find Script: Issue with find criteria


      I posted a similar find script problem a few weeks ago that was resolved by using the correct table occurrence.  I've verified table occurrence before creating this post.

      With this new problem the script fails (401) and displays "No records match this find criteria", the find criteria is listed in the screenshot.  I have manually gone to the layout and input the find criteria specified in the script and still get the same error (401)


        • 1. Re: Find Script: Issue with find criteria

          Is it possible that the 2nd or 3rd field (or both) might be of type number instead of text?

          • 2. Re: Find Script: Issue with find criteria

            This second screenshot is of the specified layout with the records.

            The find script criteria is looking for all records with;

            UniqueID: 1568OAK-44-12"+

            Received In: yes

            In Inventory: no

            There are 5 records that meet this criteria


            • 3. Re: Find Script: Issue with find criteria

              All 3 fields are Text

              • 4. Re: Find Script: Issue with find criteria

                But are the far right columns the Recvin and In_Inventory fields or are they the Recvin_c and In_Inventory_c calculation fields?

                Those calculation fields return text depending on whether the Recvin and In_Inventory fields are 1 or 0 so you may be specifying "yes" where you should be specifying a value of 1.

                • 5. Re: Find Script: Issue with find criteria

                  The far right columns are the Recin and In_Inventory text fields not the calculation fields

                  • 6. Re: Find Script: Issue with find criteria

                    The calculation fields shown suggest that the values of these fields are 1 and 0. Did you perhaps use data formatting to show values of 1 as Yes and values of 0 as No?

                    Still look like a value of "yes" is the wrong search criteria to use in these fields. Looks like 1 should be used instead.

                    • 7. Re: Find Script: Issue with find criteria

                      The screenshot I posted that displays the 5 records that I looking for are a result of a manual find with Recvin = "yes" In Inventory = "no", UniqueID was not used only.

                      I did a second manual find with only the UniqueID and got the error message  "No records match this find criteria".  

                      I am at a total loss here, I'm not sure if this issue is related to a serial number problem that I posted last week. I say this because the UniqueID value is derived from the concatenation of the values, OrderID (serial number) and SpecieID.

                      There's something about this UniqueID that I just can not find.  It doesn't make since that there is no problems with the 2 tables whose relationship field is the UniqueID and all layout and portal data display fine.

                      • 8. Re: Find Script: Issue with find criteria

                        There may be a difference between the data FORMAT and the data VALUE. A field with the value 1 in it can be formatted to display the text "yes". This does not change the value of the field and your search criteria would need to specify the Value 1 and not the format "yes".

                        What do you see if you click into those fields? Do you see a 1 instead of "yes" when you click into one of them?

                        • 9. Re: Find Script: Issue with find criteria

                          To answer your last question first, I see "yes", "no" respectively for Recvin and In Inventory text fields of the records I select.  

                          Might I ask why you are persisting with questions regarding fields that are not on the layout nor referenced in the script?  I answered your posted (at 10:33 a) this morning regarding which of the fields were being used, I'm using the text fields for Recvin and In Inventory not the calculation fields Recvin_c and In Inventory_c.

                          I have indicated in most of the request for help that I post, I'm an SQL person and I'm relatively new to this version of FileMaker Pro but I'm not a novice in area of database development.  I try to provide the best answers to questions I receive from the forum and I'd also like to make sure that I get answers to the questions I post.  Obviously there's something I don't see that requires more input to provide clarity.

                          Do you have any idea of what could be causing the error message (401)  "No records match this find criteria" when I do a manual find for the UniqueID only?

                          • 10. Re: Find Script: Issue with find criteria

                            I AM referring to the fields on your layout. But I am also discussing two calculation fields that suggested a possible explanation for the results that you are getting. You have two calculation fields that return "yes" when these two fields have the value 1--which suggested that you don't actually have "yes" and "no" text in these fields in the first place and thus your finds would fail.

                            And I did have an idea--two different ideas in fact, that was why I was asking if the value of those two fields are really text and really the text "yes" or "no". If the fields were of type number, searching for the text "yes" would fail. If the value in the field is 1 but formatted to display as "yes", this would also produce this error message.

                            But if you are a) sure that these are the fields named recvin and In_Inventory and b) the values really are "yes" or "no", then what I was suggesting is not possible.

                            But With that, I have no idea how what you describe can even be possible--which suggests that some detail was missed here.

                            If you have a small copy of this database with no sensitive info in it, you are welcome to upload the file to a sharing site such as Drop box and post the link here so that I can download the file and take a look at it.