Using <FOREACH> in a table

Discussions related to ReadyDoc development.
Post Reply
tzinib
Posts: 6
Joined: Mon Oct 26, 2009 6:50 am

Using <FOREACH> in a table

Post by tzinib »

I created a table in the attached document. I want each contact to come up in a separate row. How can I do that?
Attachments
select .doc
(28.5 KiB) Downloaded 59 times
Mark McKenna

Re: Using <FOREACH> in a table

Post by Mark McKenna »

Currently there is no way to generate new rows within the same table as part of an iteration.

However, I've attached a couple of Word documents that demonstrate 2 unique approaches that should work with the most recent version of SPML.
  • The first one leaves things pretty much as you had them but standardizes alignment and adds a few line feeds to counteract the effect of automatic line feed suppression that occurs on certain command tokens to eliminate unwanted vertical space that would be otherwise consumed by markup. The individual rows are now aligned, but they do not each consume their own physical table row as you may prefer.
  • The second one splits the table into two and moves the FOREACH block around the second table to create new single-row tables for each qualifying order contact. Again, technically we're not creating new rows in the same table. This can produce an undesirable result when you leave borders in place, but I would submit that it looks rather attractive when rendered border-less as shown.
Hope that helps.
Attachments
151-2.doc
Version 2
(28 KiB) Downloaded 62 times
151-1.doc
Version 1
(29 KiB) Downloaded 56 times
tzinib
Posts: 6
Joined: Mon Oct 26, 2009 6:50 am

Re: Using <FOREACH> in a table

Post by tzinib »

Thank you very much, it was very helpfull!
Post Reply