Tim S Posted August 26, 2009 Posted August 26, 2009 I need to know how to write a script to separate e-mail addresss on an import. I have a customized solution that imports the e-mail field from our school's SIS. The problem is that if a parent puts in more than one e-mail ie ([email protected], [email protected]) the custom solution I have create imports exactly what's there and puts both addresses in the same field in FMP. I need to have the first e-mail placed in emailfield1 and the second e-mail listed placed in emailfield2
bcooney Posted August 26, 2009 Posted August 26, 2009 The emails are stored in the school's system in one field, each separated by a comma?
Tim S Posted August 26, 2009 Author Posted August 26, 2009 (edited) Yes, and I need to parse them into two separate fields in my FMP solution during the import process if possible. Edited August 26, 2009 by Guest
bcooney Posted August 26, 2009 Posted August 26, 2009 You cannot do this during the import step. You can import them into a utility field (Emails_All) and parse that field using Text operators and the substitute function. ( I'd confirm that the school's system doesn't store the emails in separate fields, and is giving you an export that has combined the emails. ) Here's a parsing demo. I'd probably structure your system to have all emails and phones stored in a separate table "COMM", related to the student by StudentID. Then, I'd create email records using a looping script, that uses the valuecount of the email_all field as a counter. I'd do this because you are limiting yourself to an arbitrary count of emails. ParseEmails.fp7.zip
Tim S Posted August 26, 2009 Author Posted August 26, 2009 Sometimes in life you spend hours and hours trying to figure out a solution. Then all of a sudden an angel pops into your life and BANG life is good! I can't thank you enough for this solution. That huge gorilla has jumped right off of my back!
Recommended Posts
This topic is 5567 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 accountSign in
Already have an account? Sign in here.
Sign In Now