2 Replies Latest reply on Jan 8, 2010 9:35 PM by Owen

    Portal filtering???

    Owen

      Title

      Portal filtering???

      Post

      I'm trying to build an email archive that will show all the emails sent to or received from a particular client when I'm on that clients record.  I've had some success with a second table to filter the email (which is a duplicate of the email table) but I'm stumped by how to make it more generic.  ie the to field gets imported out of mail on a mac into a filemaker DB and looks like this <!--  StartFragment  -->"Smith, Mary" <mary.smith@someplace.com>, "Jones, Fred" <fred.smith@someplace.com>  if manually go in and change the to field to be fred.smith@someplace.com it all works for his record and the emails pop into the portal displaying that found set.  What I can't figure out is should I do some sort of parsing on the to field, or is it more in the relationship I've established between the global to and the contact to which is currently an equal one.  Hopefully that makes sense.  Thanks in Advance.

      Owen 

        • 1. Re: Portal filtering???
          user9755
            

          What I would do is keep the raw imported data in one field and create a second field that's an auto-enter calculation to pull out everything between the "<" and ">" of the first field.  Then make your relationship between the email address of the contact and this second, parsed email address in the emails table.

           

          Any way you do it, you're correct in assuming you'll need to strip out all but the email address to make the portal work.

          • 2. Re: Portal filtering???
            Owen
               Thanks Brian that makes sense to me.  The wrinkle that I found was simply some of the to's or cc fields have comma seperated names with the list and I want to get the records matched back up with the particular contact.  So my strategy it sounds like is to strip the extra info out into that calculated field and then in other programs I would just simply put each name in a slot in an array and then do the relationship back with the array.  So I think I just have to work out the syntax and language FMP uses.  I think the same logic will let me show all the from, cc, to entries for the contact in the same portal too.
            Owen