0 Replies Latest reply on Jun 12, 2015 12:02 PM by matie-atioxx

    How to iterate and fill the values of a collection dynamically?

    matie-atioxx

      Hey,

       

      I have a pretty complex task and I'm using Acrobat 9. I have a collection of items that should be displayed in 2 columns: One-to-Many or Many-to-one.

       

      Example mapping would go like this:

       

      One to Many:

      - items[1].prices[1] -> items[1].sizes[1..n]

      - items[2].prices[1] -> items[2].sizes[1..n]

      Many to One:

      - items[1].prices[1..n] -> items[1].sizes[1]

      - items[2].prices[1..n] -> items[2].sizes[1]

       

      Example display:

       

      ProductA.price   -> - Desc1

      <empty>           -> - Desc2

      <empty>           -> - Desc3

       

      ProductB.price   -> - Desc1

      <empty>           -> - Desc2

       

      As you can see, it is impossible to manually map it. The way they are filled, although related, is that all product prices are in one collection, and all sizes in another collection.

       

      Assuming we take the 1:M approach, how can I know that I went from item 1 to 2, and should not print 2 unless "sizes" of 1 are done iterating on the other side?

       

      Can I even provide a collection and auto-fill fields?

       

      Thanks a lot.