6 Replies Latest reply on Aug 16, 2011 12:16 PM by philmodjunk

    Parsing a value list

    JosephCasey

      Title

      Parsing a value list

      Post

      Does anyone know if you can parse a value list? I have a list of last names, first name. Now i need to be able to spperate the data into two fields

       

      thanks

      Joe Casey 

        • 1. Re: Parsing a value list
          LaRetta_1

          Parse a value list?  For clarification, value lists are values separated by carriage returns.  Which do you have ... a FIELD with the full name or a value list with full names?

          Is the data consisent as:  LastName, FirstName (with comma and space between?)  Are there any with middle names or initials?  Suffix?

          Yes, data in a field can be split into different fields but we must be sure the parsing process takes into account all of the data configurations within the field. 

          • 2. Re: Parsing a value list
            philmodjunk

            Either way, the short answer is yes, you can parse it and with many of the same "value" functions such as GetValue, FilterValues, leftvalues, rightvalues and Middlevalues.

            There ARE differences in the first steps in how you'd set this up depending on your answer to LaRetta's excellent question...

            • 3. Re: Parsing a value list
              JosephCasey

               Thanks for posting. The data is in the format of "Firstname" space "Lastname". The data comes from a value list. I inherited poor past programming.

               

              I tried this and it does not work

              LeftWords ( Table::Field ; 1 )

              • 4. Re: Parsing a value list
                philmodjunk

                Leftwords ( table::field ; 1 ) will return the first word of Table::field for the current record. Characters such as a space are interpreted as "word separators" to control what text is returned. So this function should have returned the First Name for the current record. (If a different character that looks like a space but isn't actually a space character such as a "sticky space" was used, you'll get buth first and last name returned.)

                What were you trying to do?

                Are you trying to manipulate data in the records or in the value list used to enter that data? If the value list, how is it defined?

                • 5. Re: Parsing a value list
                  JosephCasey

                   

                  Trying to manipulate the data in the record, the data comes from a value list. On one layout the user picks their name. on another layout the field gets reused. I want to break it up on the 2nd layout. What I don’t understand is why leftwords is not working. I created this formula, and placed it in conditional formatting. Is it not in the correct place?

                   

                  LeftWords ( LEGAL_COLLECTIONS::Attorney_Assigned ; 1 )

                   

                   

                  Does it need to be a script?

                   

                  • 6. Re: Parsing a value list
                    philmodjunk

                    It can't be in conditonal formatting with this expression. YOu can define a calculation field to return the value (and make sure that your value list enters the actual name and not an ID number with the name displayed from "field 2".)

                    It's possible, if you are using FileMaker 11, to use a variable inside a conditional format expression where the expression assigns the value and you then place the variable as a "merge variable" on your layout. If LaRetta is still following this thread, she is welcom to chime in with her approach for this method as it is one she strongly recommends.