I have the following setup:
Master Template
First Main Template (Assembled, and based on Single-Select Variable)
Second Main Template (Assembled, and based on a Multi-Select Variable)
Sub-Main Template (Auxiliary Template which itself calls Auxiliary Templates based on a) a second Multi-Select Variable for cover page, certificate of service and table of contents; and b) a third Multi-Select Variable for written pleadings, legal brief and pre-hearing statement, and a few others.
Now, within this Sub-Main Template, the second Multi-Select Variable determines whether to include the cover page, certificate of service and table of contents, but the third Multi-Select Variable determines the type of document that are ultimately being created with the cover page, etc. In some scenarios, I might one, some or all of those documents (written pleadings, legal brief, pre-hearing statement, etc.).
I don't want to create only one set of the cover page, certificate of service and table of contents once if I am creating more than one of the final documents - I will need them for each separate document if it's two or more.
I also don't want to use a Repeat Dialog, primarily because it would require reworking a lot but also because it's just in this one instance when I am creating more than one of the document types that I am trying to create additional cover pages, etc. for each additional document.
So it would be cover page, etc., written pleadings, then cover page, etc., legal brief, etc.
Right now the best solution I have is to use IF statements in the Sub-Main Template for cover page, etc., and then create separate templates to contain the written pleadings, etc., and within each of those new templates to call the Sub-Main Template at the top as an Auxiliary Template so the cover page, etc. are included in each one separately.
Don't know if this makes sense, but ultimately I was hoping for something like a FOR EACH loop. I thought about trying to use the WHILE statement, but I am not sure that would work.
Any advice is appreciated. Thank you.
If you have not already tried this, go into your component file properties in HD Developer, Assembly Tab, and increase the Maximum WHILE Iterations and Maximum processing stack depth with an arbitrarily large number of 0's. If memory serves, by default those values can be quite small, which may be causing the memory issue you are experiencing.