1 Reply Latest reply on Dec 29, 2009 4:50 PM by comment_1

    isolating text in a comma separated series

    trialuser1111

      Title

      isolating text in a comma separated series

      Post

      I am trying to build a script that takes a global field of comma separated values (e.g. "Alpha, Beta, Gamma, Delta") and uses them for a multiple-step search.  My current plan is to isolate each word (and it will always be a single word) and turn it into a variable to be used in the find steps.  The first one is very easy, I use the Leftwords() script step.  However, I'm having a tough time isolating the text in the 2nd, 3rd, or 4th words.  Is this possible?

        • 1. Re: isolating text in a comma separated series
          comment_1
            

          I believe that comma-separated pre-supposes values of several words - otherwise why bother with the commas at all? If all your values are single words, you can use the MiddleWords() function to extract any one of them.

           

          Note that Filemaker recognizes a return-separated list as a list of values, and has a bunch of functions designed to handle such; specifically, the GetValue() function would be quite handy here.