I need to populate a Repeating Table values from a SharePoint list. To be clear I don't want to "link" values from list, I want the values copied into this table. I have limited success of copying values one by one, but what I need ideally is that once form loaded, the columns from specified List are all copied into this Repeating Table.
To be clear I don't want to "link" values from list, I want the values copied into this table
For this, avoid creation of Infopath form template of compatibility/type "Sharepoint List Form"
Fig.1 Infopath form template of type Sharepoint List Form
or, at least, Main Data Connection, which is created by either:
- choosing "Sharepoint List" template in Infopath Designer 2010 (IPD) File > New
- pressing Customize Form on ribbon in browser upom navigation to already existing sharepoint list
The Sharepoint List Form type is rigidly linked to a sharepoint list with locked Main data connection, cannot be modified OOTB or changed to other types. Compare Fig.1 with Fig.2
Fig.2. Modifiable (explicitly created) types of Infopath forms
Instead, in IPD, choose to create any other choices (except Sharepoint List template) form template, for example, File > New > Blank Form or Blank Form (Infpath Filler) > Design Form. Their type/compatibility can always be changed later in Form Options > Compatibility > Form Type:.
Fig.3. Templates in Infopath Designer
Note that all other template types presented in File > New of IPD are subtypes/variants of these two basic types differing by published location (like Sharepoint Form Library) or added data connections (like Database, Web Service, etc. templates) can always be configured and changed, in contrast to maverick types of Sharepoint List Form and WorkflowForm, where main DS or published location cannot be changed OOTB)
Choosing the Blank Form will result in Web Browser Form compatibility type and Blank Form (Infpath Filler) in Filler Form
There create a data connection by choosing "Data Connection" (Data tab on wizard) having chosen in following data connection wizard > Receive Data > Next > Sharepoint library or list > ... further choices are straightforward to chhoose existing sharepoint list and its fields
This will create Secondary Data Source (2DS) to a sharepoint list which you can Drag'n'Drop on Design surface of IPD as Repeating Table (RT)
Fig.2. Drag'n'dropping from Secondary Data Source (SharepointListItem_RW)
Secondary DS (2DS) is read-only (sharepoint list items cannot be CRUD-ed - CReated-Updated-Deleted) and there can be many 2DS. Note that you should not drag'n'drop RT from ribbon of IPD since it create underlying data fields in Main Data Source (Main DS can be only one and it is updatable, in contrast to 2DS).
Fig.3. Rendering Sharepoint list in Web Browser Form (all columns)
or the same having deleted some columns from RT in Infopath Designer from visual rendering
Fig.4 Deleting columns from Repeating Table
Fig.5. Rendering Sharepoint list in Web Browser Form (selected columns)