Forum Discussion
MichaelBarrow
9 years agoQrew Cadet
I have a very similar use case as the original question here. I am synchronizing Gmail to a table, and one of the fields is the body of the email, with field name [Body]. These emails are website visitor form submissions, where each row of the body is started with a field label, followed by a colon (and sometimes a space or three) and then the value that I want to extract after the colon and before the end of the line. I have this process as a legacy app in Microsoft Access and I am wanting to move it into QB. The function I wrote in Access gets passed a field label name and finds it and grabs everything after the colon and before the carriage return end-of-line character for that row. I don't think that the carriage return character is available to me in QB functions.
The reason this is important is that I have thousands of different forms feeding this email account, and not all of them are set up identically. People aren't consistent in their setups and use of field label names, and not every form has the same questions or field labels.
In other words, it looks to me like the solutions above assume that there's a certain order to the field labels. Is there any way I can make this approach work by grabbing only the characters after the colon for a specified field label and only grab characters to the end of that line in the body containing that label?
Thanks,
Michael
Below are two example emails:
---------------------------------------------------------------------------
Reference #: 10195972
Status: Complete
How can I help you?: Do you fill adult cavities?
Name: Juliet Smith
Email: xyzzy@yahoo.com
Phone: 3224405555
FormSiteID: 3088
Date: 2017-04-18 10:28:13
Start Time: 2017-04-18 10:27:40
Finish Time: 2017-04-18 10:28:13
Duration: 0m 33s
User: 71.251.203.91
Browser: Chrome
OS: Mobile
Referrer: http://www.cosmeticdentistryhoboken.com/
---------------------------------------------------------------------------
CALLID: 497094b8-244b-11e7-8108-23564e714fbd
CLIENT: 2340878
TRACKING NUMBER: 1 (855) 857-5555
SOURCE: Direct
TIME: 2017-04-18 9:25 am
NAME: Wendy Smith
STATUS: completed
NUMBER: 1 (303) 555-1212
DURATION: 2:30
ADDRESS: Denver CO
KEYPRESS:
LISTEN: https://s3.amazonaws.com/recordings_2013/4bc0503c-244b-11e7-a1da-0aa1611.mp3
---------------------------------------------------------------------------
The reason this is important is that I have thousands of different forms feeding this email account, and not all of them are set up identically. People aren't consistent in their setups and use of field label names, and not every form has the same questions or field labels.
In other words, it looks to me like the solutions above assume that there's a certain order to the field labels. Is there any way I can make this approach work by grabbing only the characters after the colon for a specified field label and only grab characters to the end of that line in the body containing that label?
Thanks,
Michael
Below are two example emails:
---------------------------------------------------------------------------
Reference #: 10195972
Status: Complete
How can I help you?: Do you fill adult cavities?
Name: Juliet Smith
Email: xyzzy@yahoo.com
Phone: 3224405555
FormSiteID: 3088
Date: 2017-04-18 10:28:13
Start Time: 2017-04-18 10:27:40
Finish Time: 2017-04-18 10:28:13
Duration: 0m 33s
User: 71.251.203.91
Browser: Chrome
OS: Mobile
Referrer: http://www.cosmeticdentistryhoboken.com/
---------------------------------------------------------------------------
CALLID: 497094b8-244b-11e7-8108-23564e714fbd
CLIENT: 2340878
TRACKING NUMBER: 1 (855) 857-5555
SOURCE: Direct
TIME: 2017-04-18 9:25 am
NAME: Wendy Smith
STATUS: completed
NUMBER: 1 (303) 555-1212
DURATION: 2:30
ADDRESS: Denver CO
KEYPRESS:
LISTEN: https://s3.amazonaws.com/recordings_2013/4bc0503c-244b-11e7-a1da-0aa1611.mp3
---------------------------------------------------------------------------