When working with certain layout types, such as XML, it is possible to have portions of the the input source repeat multiple times.
For example, the XML below has the tag
multiple-occurrence occur three times, each with unique nested values. This is referred to as a sublayout within Infogix Assure. In addition, the
note field occasionally displays multiple times within the sublayout.
This article will demonstrate how to capture when you have repeating sublayouts. A related article will capture data from repeating fields. The XML below will be used as the sample input source.
shared value across all IDs
Setting up the Infogix Assure layout
When using auto-generate to create the layout, the repeating sublayouts and field will be automatically picked up and defined. In some scenarios where repeats are less common or not defined in a schema, the automatic generation may not pick up on it.
To verify if your layout was creating correctly, open the sublayout or field that repeats and inspect the
Occurs field. This should be set to
Many to any item that repeats.
In the XML example at the beginning of this article, the
note items will have an
Occurs set to
Capturing data from repeating sublayouts
This section assumes that you already have an understanding on how Infogix Assure controls are created and will focus on the specific steps within a Control Point's Capture tab to pull data from repeating sublayouts.
When working with sublayouts that have an
Occurs setting of
Many, you'll notice that the fields within the sublayout aren't immediately available for use:
In order to access the fields within it, you will first need to use the
Type to add a variable for
After the new layout type is added, you can now reference the embedded field anywhere within your Capture code - you aren't limited to solely the new
When Layout Type section. Now that the data is readily available, you can continue coding the control like a standard control.