4 Replies Latest reply on Jun 13, 2011 1:03 PM by LaRetta_1

    Invalid Find Criteria

    TurtleKoala

      Title

      Invalid Find Criteria

      Post

      When I perform the following script I get a message saying, "The provided find criteria is not valid. Enter a valid request before proceeding." Does anybody know why this is happening? The responsibility field is present on my layout, and the gResponsibility field is set by a dropdown using a value list consisting of values from the Responsibility field, so the value should be valid. Also, is it possible to perform a find like this where the field I want to set is not visible on the layout?

      FMimage.png

        • 1. Re: Invalid Find Criteria
          philmodjunk

          Immediately after running this script and getting the error, choose Modify Find and see what data, if any was entered as search criteria into your reponsibility field.

          Make sure that global storage is enabled for gResponsibility and make sure that gResponsibility and Responsibility have the same data type.

          • 2. Re: Invalid Find Criteria
            TurtleKoala

            Thanks for the extremely fast response. I'm new to FM and didn't realize that you had to enable global storage for global variables.

            • 3. Re: Invalid Find Criteria
              philmodjunk

              This isn't a global variable, it's a global field. Wink

              Global variables are something else. That's why you have set field to set field values and set variable to set values in variables.

              The g at the start of the field doesn't affect the function or type of the field in anyway. This is just a commonly used naming convention that makes it easier to see that you are working with a global field when you are in the process of using it in scripts and calculations.

              • 4. Re: Invalid Find Criteria
                LaRetta_1

                Hi Eric,

                I would add this to the advice you have been given:

                If the two tables are not related and gResponsibility is not set to global storage, you would indeed get the error "empty find criteria" which throws Error #400 and when you run the Modify Find it will be empty.  If the field is set to global storage, it can be accessed from anywhere and the tables don't even need to be related.