Is There A Way To Use Multiple Mapping Configs For A Single Template

Hi,

I have many jobs that have local data and international data. The two files will have different amount of columns and column names. Can we use multiple data mappings for a single template and make the address block conditional?

Regards,

S

As long as the Data Models created by the two Data Mapping configs are compatible (i.e. contain the same field names and types), then your template can use them both. The idea is to store values retrieved from different columns into the same fields in the data model.

So for instance, you data model may have a field named Phone Number. Your “international” data mapping configuration would store the “InternationalPhoneNumber” column in that field, while your “local” data mapping config would store the “Phone” column in the same field. Different sources, common output. Your template won’t care where the data comes from since it’s all stored in the same data model format.

You might want to add a field that allows you to specify whether the original data was from an international or a local source, which may help you with conditional elements in your template.

Hi Phil,

Below is the header rows in each data type.

International:

barCode TITLE INITIALS SURNAME COMPANY ADD1 ADD2 ADD3 CITY POSTCODE COUNTRY seq

Local:

BarCode text Title Initials Surname company ADD1 ADD2 TOWN POSTCODE Seq

As you can see we have similar columns but the difference starts with the international having two extra address fields CITY and COUNTRY.

Do you mean that I would have to manually add those two fields (as blank) to the local data so their models created by respective data mappings match?

I would have thought there would be a better way.

Regards,

S

Those “empty” fields will not take any additional space in the database. Also, if you want to design your template for both data sources, how else would you be able to drag and drop the “international” fields onto it? They have to be available in your datamodel.

If those extra fields only occur in the Address block and you don’t need to have access to the individual fields that make up that address, then you can create a single HTML Address field which contains 5 or 7 original source fields, depending on the original data source, in which case you’d never have any empty field in your datamodel, but that’s entirely up to you.

HI Phil,

Thanks for the advice and replies. This is not too much of a requirement, I was just wondering if it was possible. What would be nice is if the data mapper could have two RECORD structures in it and then have two conditional positioned boxes using each depending on the data you wanted to use. Like below but one can dream.

Anyway, it is not a train smash to have two templates/mappings. I just like to minimise the amount of templates when it comes to certain print runs.

Regards,

S