Expand my Community achievements bar.

Schema binding, add new subform instance

Avatar

Level 1

I'm creating a fairly simple form which has an unknown amount of grouped entries. I made a data connection to my schema and used "Generate Fields" to bring the fields into the document bound to the schema.

If I do this multiple times using each instance as a subform I can get a nice xml doc out of it ripe for digestion like so:

<root>

     <entry>

          <data1>

          <data2>

          <data3>

     </entry>

     <entry>

          <data1>

          <data2>

          <data3>

     </entry>

</root>

However, I don't know how many entries the client will be adding so I want to have a button that adds a new instance of the bound data as done manually before. I have been able to prove the concept with a static subform using _Subform1.addInstance(1) on a button.

When I try to apply it to the bound data subform, nothing happens, no error, no new instance. Also the Repeat Subform for Each Data Item area is greyed out in the Object Binding for the Schema-ed subform.

Does anyone have an idea about what's going wrong here?

Thanks in advance,

Kevin

2 Replies

Avatar

Level 10

Few things to check here.

1) The parent subform needs to be set to Flowed. Then you should get the Repeat Subform for Each Data Item enabled for you.

2) The form should be saved as dynamic.

Let me know if you still have issues. If so, send the form to Livecycle9@gmail.com so I can have a look at it..

Thanks

Srini

Avatar

Level 1

Thank you for the reply Srini.

The actual problem was that I was looking a the bound data group to replicate. When I started looking at the parent Subform everything started to make sense. I was able to replicate the wrapper with the data subset inside it.

Thanks,

Kevin