3 Replies Latest reply: May 15, 2014 10:01 AM by joey RSS

    Single Input Record to Output Multiple Records

      In a single Input record (CSV, Comma Delimited) I need to produce Multiple output Records.


      For example:  Input Record 1 Phone 1 714-555-1234 should produce one output record

                         Input Record 1 Phone 2 714-555-5678 should produce an additional and        seperate output record.


      So the question is... Does Monarch (V 9 Pro) have the ability to produce multiple output records based on results from input record.

        • Single Input Record to Output Multiple Records
          Grant Perkins

          To some extent it depends upon what you want to do with the results.


          If you read the file as a database and end up with fields for Phone1 and Phone2 and then want to output each with common additional fields, one option would be to create a summary that produced a record using the Phone1 field plus other fields required. Change the default name of the summary field to, say, Phone within the summary definition.


          Then, since you have V9, duplicate that summary to create a second summary with the same format but replace Phone1 with Phone2 and rename that also to Phone. (save the second summary definition at least once before renaming the field in the second summary to avoid confusing thing in the cache memory.)


          You can then use a Project Export to export both summaries to the same output file (or wherever). It would likely need to be sorted of course.


          There are likely to be other approaches as well but this one is the first that came to mind.


          Does it help?





            • Single Input Record to Output Multiple Records
              Grant Perkins

              It's just possible there is a way to deal with this in a single pass based on an idea that was described to me last week.


              Any chance you could provide a sample data file (just a few lines) to experiment with?




                • Single Input Record to Output Multiple Records

                  If it is true that every phone number is the same number of digits and the number of phone numbers per line is constant (or at max a certain number), you could use a multiple column region.  For example if there are 10 phone number max per line and each one is 12 digits with a coma you could say there are 10 columns per line with 13 characters per column.  Cases where there were only 8 phone numbers per line wouldn't cause a problem.


                  If there is a variant number of phone numbers with no limit to the number per row, then it gets somewhat messy.  It's possible, but messy.