2 Replies Latest reply: Aug 11, 2017 3:09 PM by Grant Perkins RSS

    Filtering by First Value in a String?

    Kristine Birky

      Hello,

       

      I have a field that pulls contract numbers but we only need ones that start with a C or a V.

      I am trying to use a formula filter with the formula  LEFT([Field],1)="c" .or. "v" , but it is giving me an error.

      Examples of the contract numbers that are pulled are B687458, C786545, G789545, and V789545. What would be a formula I could use in either a filter or calculated field to give me these results?

       

      Thank you,

       

       

      Kris

        • Re: Filtering by First Value in a String?
          Kristine Birky

          Forgot to mention that I am using Monarch Classic 13 and am fairly new and self taught to the program. Thank you!

          • Re: Filtering by First Value in a String?
            Grant Perkins

            Kristine,

             

            Welcome to the Community.

             

            Just to confirm things ....

             

            Are you working with a "report" or something that is used as a "database"?

             

            If a report I assume you have created a template, trapped the fields you need and the result is a populated table that you now need to filter some more.

             

            Just to see what is going on a little more clearly try creating one filter for "C" and another for "V" and checking that both give the result you expect.

             

            You can then create a compound filter to see what happens what you use them together.

             

            As written your formula is not as it needs to be.

             

            You could write it as:

             

            LEFT([Field],1)="c" .or. Left([Field],1)="v"

             

            Or

             

            LEFT([Field],1).IN.("c","v")

             

            Or simply define each filter separately as previously suggested (they may also be useful like that?) and then create a compound filter that includes both of them, getting 3 filters for the price of 2!

             

            (I should point out the these are no the only options here but they are the ones that seem to make some sense for your immediate needs.)

             

             

            HTH.

             

            Grant