Sharepoint form master detail relationship

How I did it - Sharepoint: Master Detail in Sharepoint (1/2)

sharepoint form master detail relationship

Here we can, with a single click, drop related list or library to the edit or new form, and that way create a functional master-detail relation, where. I need to create a couple of related lists in a Master/Detail approach. .com/ creating-a-parentchild-list-relationship-in-sharepoint/. The child form accepts the PK and plugs it into a readonly (hidden if you field ( e.g. "Parent ID") used for binding the master-detail relationship.

In the following illustration, employees in a human resources department click a row in a repeating table to access detailed information about an employee. When users click a specific row in a repeating table the master controlone or more detail records are displayed in a repeating section or repeating table the detail control elsewhere on the form.

How to create two linked lists (Master/Detail or Parent/Child)

If your form template is intended mainly for onscreen viewing, consider placing the detail control inside a scrolling region on your form template. That way, if there is a large amount of data displayed in the control, your users can scroll through the data.

Note that this isn't the best option if you think users will want to print their forms, because any data that is hidden in the scrolling region onscreen will also be hidden on the printed form. Top of Page Compatibility considerations When you design a form template in InfoPath, you can choose to design a browser-compatible form template.

To work around this limitation, you may want to design your form template so that users can display two views, a "master" view that lists certain items and a "detail" view with expanded information specific to each item in the master view.

By default, both controls contain other controls, which are bound to fields in that repeating group. Controls can be bound or unbound.

sharepoint form master detail relationship

When a control is bound, it is connected to a field or group in the data source so that data entered into the control is saved in the underlying form.

When a control is unbound, it is not connected to a field or group, and data entered into the control is not saved. When you select or move your pointer over a control, text and a binding icon appear in the upper-right corner of the control. The text indicates the group or field to which the control is bound in the data source. The icon indicates whether the control is correctly bound to that group or field.

When the binding is correct, a green icon appears. If there's something wrong with the binding, you'll see a blue or red icon instead. The data source for the form template consists of fields and groups that appear in a hierarchical view in the Data Source task pane.

In the following example, both the master control and the detail control are bound to the d: Employees repeating group in the Data Source task pane.

In a one-to-many relationship, master and detail controls are typically bound to separate repeating groups. When you design a new, blank form template, the Automatically create data source check box in the Controls task pane is selected by default. This enables InfoPath to automatically create fields and groups in the data source as you add controls to the form template.

These fields and groups are represented by folder and file icons in the Data Source task pane.

sharepoint form master detail relationship

On the form template, place the cursor where you want to insert the control. In the Number of fields in detail box, enter the number of fields for the detail control. InfoPath inserts two controls on your form template. The first is labeled Repeating Table masterand the second is labeled Repeating Section detail.

Multilevel Cascading Dropdowns for SharePoint 2013, 2016, and O365 Classic forms

Related data should appear in the detail control. Master and detail controls can be bound to the same repeating group or to different repeating groups, depending on your needs.

Insert a master/detail control

Under Insert controls, click Repeating Table. On the first page of the Repeating Table Binding Wizard, click the repeating group that you want to bind the table rows to, and then click Next. If your table has only one column, you can select a repeating field instead of a repeating group. To create a new repeating group to bind the table to, right-click the group to which you want to add the repeating group, click Add on the shortcut menu, and then in the Add Field or Group dialog box, enter the repeating group's properties.

To add the columns that you want to include in the table, double-click the fields in the Data binding list.

sharepoint form master detail relationship

I have been asked in the sake of time to just normalize the table as much as possible with CustomerIDs, EmployeeIDs, etcbut keep all the "Widget" fields in there. I had proposed that we create a Master Detail type relationship where the users would Add a Row perhaps in a GridViewselect the "Widgets" they created that day from a drop down and enter their quantity.

They generally only make 1 - 3 types of Widgets per day. The users hate this design and want me to give them a data entry form with ALL the widgets displayed so they can just click in the box beside the Widget they created that day and enter their qty and then click save.

I would probably have to create a Web Part with a GridView and just populate the GridView with all the possible Wisdgets, then let the user enter the proper Qty s beside each widget they are made that day.

sharepoint form master detail relationship

Once the form is submitted back, I would then have to go through it and find any Qtys that are valid Numbers and add a child detail record for that Master record. The Master Record would contain date, employee, customer, etc.

Automatic Parent/Child List Relationships for Large Lists in SharePoint –

The "edit" form would also have to work in a similar way. This is a pretty "ugly" solution and I was looking for an alternative. If I can't come up with a good alternative and convice my manager that the code won't be too difficult to maintain or add too much development time to the project to complete it on time then I will have to bring over this ugly, existing schema with all its wasted space and have "hard coded" stuff thoughout the application.

Another consideration is the reporting. Right now all the reports just contain a column on the report for every widget.

sharepoint form master detail relationship