AnsweredAssumed Answered

Extract Text data from a field based on an ID

Question asked by ndveitch on Mar 14, 2017
Latest reply on Mar 14, 2017 by mikebeargie

Hi There,

 

Is it possible to extract text from a field where the values to look for come from a value list?

 

I am busy building an email function for my client using the MBS plug in and I have gotten the send and receive working but now I need to start manipulating the data from the email that comes in. It is a patient database that I am working on and what we have decided is that the users are going to forward any emails from patients or related to patients to a certain email address. This email will be picked up by FileMaker and then saved in the system, but I need to know if the email is just a general email or if it is for a certain patient. We have decided to that the user will add the PatientID to the subject of the email before sending. The I can just do a Left( Email::Subject ; 6 ) and I should get the PatientID.

 

The one thing I am worried about is that one user who either adds the PatientID at the end of the subject line, or puts it in the body of the email. Then the Left() wont work.

 

I was wondering how difficult it would be to maybe parse the subject and body of the email to see if there is a portion of text that matches to a PatientID. The PatientID is formatted xxx000 with the first 3 characters of there surname in upper case and then either 001, 002, 003 and so on.

 

The other worry is that although now the database will only have a few names in it anything I do could seem to run pretty quickly, but when the database grows I might be in a bit of trouble.

Outcomes