Jump to content

This topic is 7737 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

howdy all.

i'll try to be as clear as possible with this one.

applicants fill out a form online. this is returned to us via an email with the data they've entered. the data comes back like this:

First name: josh

Last name: brown

Phone number:303-555-1212

street address: 1234 any street, apt b 6

references: mickey mouse, 720-555-1212

donald duck, 520-555-1212

spong bob squarepants: 213-555-1212

etc...

now, what i'd like to do is extract the important data (ie, the data itself, "josh" "brown" "1234 any street, apt b 6" and not the field labels like "first name, last name, address".) and parse it out to it's field in my db.

i have gotten it to work so far by using middle words, cos the third word will always be the applicant's name. the 6th word will be the applicant's last name, as long as they didn't enter two first names.

this is where my solution breaks down. addresses are different, and many of the fields on the form that are returned to us have no set number of words returned. i hope that makes sense.

is there a way to do something like this with fm?:

set field (first name) words _between_ "first name" and "last name"

set field (last name) words _between_ "last name" and "phone number"

set field (phone number) words _between_ "phone number" and "references"

set field (references) words _between_ "references" and "whatever field is next"

and so on. this way tno matter how many words have been entered into a field, it extracts the words based on the fixed words that are returned.

the email that we get back is delimited, from what i've been able to tell, the field labels (first name, last name, etc) are tabbed from the data entere into those fields, and the fields themselves are returned from each other. i imagine this would help, but i don't know.

is there a way to find the nth carriage return in a string of text?

is this the way i wanna go with this?

thanks in advance for any input....

Posted

ok, i think i figured out what i need to do. since the specific text that i need (for example, an applicant's social security number, which is buried 9 or 10 lines deep in the form), i use the position function to find the position of the field name that precedes the text i need, and the position of the field name that follows the text i need. then i can calculate the size of the text string i wanna extract. this seems like a sort of complicated way to do this, but i've made it work so far and it makes sense to me that it will work, no matter how long the text strings are that people enter, cos it's based on the "landmarks" in the form.

if anyone else has a better less time and field intensive way of doing this, please let me know. thanks again, and tahanks for reading this.

happy holidays ya'll...

Posted

wow, using the one position calc field for every destination field, i am able to do this. email me if you'd like a sample... this is gonna take a while, as each destination (some of the fields aren't on our form, they come later, in our application process, or are calcs themselves) field gets it's own calc and script, and at the end of this long process, all those scripts go into one, so parsing/extracting the application data into it's proper fields will be the click of a button.

Posted

Hi,

TextString

g_labelStart

g_labelEnd

WordCountStart = WordCount(Middle(TextString, 1, Position(TextString,g_labelStart,1,1)+Lenght(g_labelStart)))+1

WordCountEnd = WordCount(Middle(TextString, 1, Position(TextString,g_labelEnd,1,1)))

c_Parsed = MiddleWords(TextString, WordCountStart , WordCountEnd-WordCountStart)

This topic is 7737 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.