3 Replies Latest reply on Jun 8, 2012 6:54 AM by ahcho

    Wildcard searches

    ahcho

      Title

      Wildcard searches

      Post

      Hello!

      I was wondering what the notation is for a wildcard search. My problem with the wildcard search comes from an IF statement that determines what application version is being used. This statement occurs in a OnOpen script. The simplified statement is:

      If [Get(ApplicationVersion) = "Web*"]

      Goto Layout [QWERTY]

      With the "Web*" criteria, I am just checking to see if the user is accessing the database through IWP. I am able to do wildcard searches using the "*" in regular find windows but it doesn't seem to work in this case.

      Aaron

        • 1. Re: Wildcard searches
          JJ_1

          Hi Aaron,

           

          You will not be able to use wildcards in a calculation.

          You can instead do the other way around and chose to only return the first three characters from the Get ( ApplicationVersion ) that you then do the comparison on.

          You do that with the Left function, Left ( text ; numberOfCharacters ).

          The Left function returns the number of charactars that you specify from the left of the text string.

          Your script will then be...

          If [Left ( Get ( ApplicationVersion ); 3) = "Web"]

          Goto Layout [QWERTY]

           

           

          Hope this helps.

           

          J J

          • 2. Re: Wildcard searches
            philmodjunk

            You can also use:

            If [ PatternCount ( Get ( ApplicationVersion ); 3) ; "Web" ) ]

            • 3. Re: Wildcard searches
              ahcho

              Thanks!