AnsweredAssumed Answered

How do I handle a many-to-one relationship between my source document and data in the document cache?

Question asked by ChipAlexander420 on Sep 16, 2012
Latest reply on Sep 27, 2012 by Adam Arrowsmith
For example - my source document is a flat file comprised of USERID, FNAME, LNAME - one row per person.  I have an additional flat file comprised of USER_ID, PHONE_TYPE, PHONE_NUMBER - there can be multiple lines per person.  For my output file I want to have USER_ID, FNAME, LNAME, HOME_PHONE, MOBILE_PHONE - one row per person.

I have my process set up to split the phone number source file and load it in a document cache:
User-added image

The script functions look for a specific PHONE_TYPE value for loading in the appropriate destination field:
User-added image

What I wind up with in my destination file is one row for each row in the many-to-one phone number file.  What do I need to do to iterate over the records in the document cache without creating a new destination record for each match?

Thanks!

Outcomes