Quantcast
Channel: The Microsoft SharePoint Blog » views
Viewing all articles
Browse latest Browse all 3

Creating SharePoint related list views (edit and display) with no code

$
0
0

Here is the scenario:


You have a parent list, say Departments and this list has number of child related lists, such as DepartmentEmployees,DepartmentContractors etc.

Wouldn’t it be nice if you could let your users have the ability to enter newDepartmentEmployees and DepartmentContractors right on the “Edit Department” list view?

In essence, you would have a Department edit view where you could add and associate new DepartmentEmployees and DepartmentContractors.
Here is the picture for the reference:


modified related list


Here is how it’s done:

1. Ensure you have at least one parent and one child list, in our case we have one parent and 2 child lists. Parent being: Departments; and 2 children:DepartmentContractors and DepartmentEmployees 


2. Create a lookup field in DepartmentEmployees, called Department.
- Ensure your lookup field points to the Department list aka the option Get information from: is set to Departments.
- For the Require that this column contains information select Yes
- The value of In this column is set to Title


3. Repeat the step #2 for the DepartmentContractors list
4. Now go to the Departments list and create one item.
5. Navigate back to the list view and right click on the item link and open the view as a new tab


changing list view


6. Edit the resulting page by clicking Site Actions -> Edit Page (or equivalent in SP2013)
7. From the Insert menu on the ribbon select the Related List fly out and chose DepartmentEmployees, then repeat and chose DepartmentContractors


adding lated list views


8. From the Page menu on the ribbon select Stop Editing


This set of actions will apply related list views to the Display view of the form. You can repeat the same steps (6-8) for the Edit item form but click Edit Item first when editing parent list item.


This article was originally posted here.


Viewing all articles
Browse latest Browse all 3

Latest Images

Trending Articles





Latest Images