Today I have data files that can contain several models:036
037, 038, 039, within the same text file.
As each model has a different data positioning, I am creating a DM for each 03X.
Because I have N DM/Templates, my question is how to access a DM variable called AEHType that contains which 03X that data is and use it as a condition for the branch to use All in One for that template. And this is done in a loop until the file is finished and a PDF is generated with all the templates merged.
… how to access a DM variable called AEHType that contains which 03X that data is …
If you want to do it that way, you can’t use the All in One. You should use the stand-alone DataMapper task, then use the AEHType value that was extracted in order to select the proper template in the stand-alone Content Creation task.
Because I have many DM 0XX, in the example I have 036 and 046, what the plugin configuration would look like.
My data file may contain the various types of data to validate.
You would specify a dynamic name for your DM Config. In the following example, the task uses the content of the local variable named DM_Name as the name of the data mapping configuration to use.
Now in order to store the proper template name in the DM_Name variable, you can use a different data mapper config, or you can read the first line of the data file with a script in Workflow, for instance.
I tried something similar using Splitters, however when reading the first line, it identifies that the condition is valid for 036, enters the branch, but processes all data 036 in the file and ends the flow. It does not return to validate the next records containing data 045, 046…
These Forums are not meant to provide an alternative to our Professional Services team, they are simply meant to guide you whenever you have questions or need advice.
In this case, you apparently need help designing the entire architecture of the solution, from the Workflow processes to the Data Mapping configurations. This would require a fair amount of time and you would need to provide a lot more information (including sample data files). I am unfortunately not able to invest that much time in a project like this, and I doubt any of our other community members would have that kind of time on their hands.
I suggest you contact your reseller or our Professional Services so that they can give you a quote for your project.
Just a quick question. Instead of loading having a separate branch for each condition 036, 045, 046, etc., why not read out that variable that holds this variable and then use that variable in the template plugin to pick the correct template. All you have to do is have templates that holds this value (e.g. template_036.OL-template)?
This way you do not have to check anything as it already loads a template conditionally.
This is similar to what my friend Phil said above, but I didn’t understand hehe. It works, but in this example I have a data file that contains data from two templates:
the AEH036 and the AEH046.
Something similar to this
MyDataFile.txt
AEH036
AEH036
AEH036
AEH036
AEH046
AEH046
AEH036
…
…
The behavior in the flow means that in the first record it calls template 036, processes and generates the pdf file for ALL records 036 of MyDataFile.txt and ignores records that are of type 046.
In %4 I can store the page number of data, documents or pages in the job, but I cannot use something in the form of a loop so that there are no ignored templates and all records are checked.