7 Replies Latest reply on Mar 8, 2012 5:50 AM by user14386

    Clean-up a global field.


      I have a global field that is being populated with some information from an html file and I need to clean that field data to create a value list.

        • 1. Re: Clean-up a global field.

          I'd say that Regular Expressions are the way to go, to detect the lname, fname combination. I'd then write that data into a table with each lname, fname combination as records and have a value list generated from those fields.


          For RegEx Have a look at: http://www.spf-15.co...s/Regex.fp7.zip

          • 2. Re: Clean-up a global field.



            Since your data looks ¶ delimited you should be able to use GetValue in a loop to analyze each line.  Drop each line into a variable then $Left = Position(Variable;">",1;1) will give you the left edge of your data and $Right = Position(Variable;"<",1;2) will give you the right edge.

            You could then use Middle(Variable;$Left; $Left - $Right)  //or something like that with adjustment for actual character itself


            <option selected="selected" value="<ALL>">&lt;ALL&gt;</option>

                      <option value="Domain\aaRequestor">Requestor, </option>

                      <option value="Domain\UserID1">lname1, fname1</option>




            "One man's constant is another man's variable." --- Alan Perlis

            • 3. Re: Clean-up a global field.



              Thanks for that very cool file.  A bit frightening but very cool.




              “Some people, when confronted with a problem, think ‘I know, I’ll use regular expressions.’  Now they have two problems.” – Jamie Zawinski (or maybe Fredrik Lundh)

              • 4. Re: Clean-up a global field.

                That's a terrific effort but the output is wrong on the first test that I made.


                Text: There was $4200 left.

                Pattern: .($\d\d\d).

                Calc: RegexMatch( Text; Pattern )

                Result: ?


                I was expecting the result to be $420.



                • 5. Re: Clean-up a global field.

                  I have attached a file that is much simpler than using RegEx.


                  It's about 95% there so you will need to play around with it to get exactly what you want (i.e. read in the data from the file into the HTML field etc). However it is fully "dynamic" and will take in any number of well formulated HTML rows from the HTML field.


                  I hope it helps!

                  • 6. Re: Clean-up a global field.

                    You're right. I had only tried it with 3 digit numbers!

                    • 7. Re: Clean-up a global field.



                      The ExtractList sample file seems to do the trick. Thanks!

                      I will play around with it so I can get exactly what I want.


                      Thank you for your help.