Expand my Community achievements bar.

Applications for the 2024-2025 Adobe Experience Manager Champion Program are open!

Problems with instance manager and bound items

Avatar

Level 2

I'm having a problem with bound fields.

I have made a form that uses the instance manager so i can add several products,


i'm using a button to export all this to a XML file  via XML schema but for some reason when i preview the form

i can add new instances without problems and the original instance works ok but the second instance and all instances after that changes when anything is changed in any of them, they are in other words linked.

Removing the xml schema made it work like it's supposed to but how do i get it to work with the xml schema?

3 Replies

Avatar

Former Community Member

It sounds like your XML schema may not be properly setup to reflect the unlimited number of instances.

<xs:element name="products">
     <xs:complexType>
          <xs:sequence>
               <xs:element name="product" maxOccurs="unbounded">
                    <xs:complexType>
                         <xs:sequence>
                              <xs:element name="product">
                                   <xs:complexType>
                                        <xs:sequence>
                                             <xs:element name="productName" type="xs:string"/>
                                             <xs:element name="useCase" type="xs:string"/>
                                        </xs:sequence>
                                   </xs:complexType>
                              </xs:element>
                         </xs:sequence>
                    </xs:complexType>
               </xs:element>
          </xs:sequence>
     </xs:complexType>
</xs:element>

The element you wish to repeat should have a "maxOccurs" property that is greater than 1.  You should also make sure that your subform is properly linked to this element.

Avatar

Former Community Member

Here are a few samples that may help you resolve the issue.  The PDF itself, the sample schema, and the exported XML from the PDF.

Avatar

Level 2

I've added my XSD file and myself can't see anything wrong with it.

Still when i add 3 items number 2 and 3 are bound together and change when the other changes.

The bindings should be ok, tell me if you need anything else for elping me with the troubleshooting.