2 Replies Latest reply on Jan 4, 2015 12:04 AM by JonathanWaller

    Go to Layout is a feild contains specific text

    JonathanWaller

      Title

      Go to Layout is a feild contains specific text

      Post

      Hello Forum,

      I am a basic self taught Filmmaker user that uses Filemaker for my business and I am stuck on a script.

      I want to create a script that will let me advance to curtain layout only if a field contains a specific word ?

      Can anyone help or could you point me to some one who can.

      Cheers

        • 1. Re: Go to Layout is a feild contains specific text
          philmodjunk

          Contains a specific word?
           Some examples of that data would be helpful as there is more than one way to set this up depending on whether the possible values in this field are tightly controlled through use of a value list, or can be manually edited by the user.

          The basic script is:

          If [ //test for the word here ]
             Go to Layout
          End IF

          But you have options for how you test for that word:

          PatternCount ( YourTable::TextField ; "TheWordGoesHere" )

          might be one such test that you use, but note that if the word is "Apple" and the text in the field is "AppleSauce" the script will take you to the other layout. There are more rigorous tests that can be devised as well as simpler less rigorous ones. Which is the best option depends on what limits, if any, that you put on the possible values in that text field.

          • 2. Re: Go to Layout is a feild contains specific text
            JonathanWaller

            Thank you Phil. Sorry for the lack of detail but by using;

            If [ //test for the word here ]
               Go to Layout
            End IF

            it work perfectly. I was over complicating the If statement.

            Thank you for taking the time to answer my question. Much appreciated.

            Jonathan