repeatinfopath2010regions

Infopath 2010 - Create a repeating block from each item in an array on form load


Please forgive me if I don't explain this well. I'm new to Infopath. Here goes!

PROPERTY NAME = Prop 1, Prop 2, Prop 3, etc.

Below is the entire block of data that I want to repeat.

 
*PROPERTY NAME* – OPEN or CLOSED
Hours – XX:XX AM ET – XX:XX PM ET
No incidents open
IMxxxxxx - Incident details | Status: Red

This entire block needs to be repeated for each property we own. Now, while I know that I could create multiple blocks for each property manually, that makes creation and maintenance of the form time consuming . Ideally, I'd like the form to read the property's from a list or array, and insert the name into each new block when the form loads up. The rest of the info would be filled out by the user of the form. This way, if we ever add or change a property, I or someone else can easily update the form by simply adding the new item to the list/array.

I have been Google'ing this for hours today and I think my problem with search results boils down to my lack of knowledge of the proper terminology.

Does anyone have any ideas?


Solution

  • Create a secondary data connection to the source list (where does it live, BTW? SharePoint? SQL?) Drag the data node for the secondary data connection onto the canvas as a repeating section with controls. Remove controls you don't want to see and arrange the others to your liking.

    Upon form load query the secondary data source. The repeating section will then be populated with the items returned by the query. This will only read the items, though.

    If you want to edit the items, then you need a repeating group in your main data source. After querying the secondary data connection, you need to copy the data from the secondary to the main data source. Edits can be done in the main schema, and you will need a submit data connection to write back the changes.

    This is not out of the box InfoPath functionality but it can be done with code or with 3rd party tools like Qdabra Software's qRules.