Infowise Associated Items field is a great solution for parent-child relationship between two lists, or in other words – to show sub items of a different list on a list item, to get the look and feel of a repeating section within a SharePoint list item.
One of the coolest features of the associated items is that it enables to add new items to the sub list, directly from the parent item.
Here we are going to take one step further – to generate the sub items automatically, or in other words - to create predefined sub items.
In this demo we will bring an example of a simple Purchase Request system which generates a predefined sub tasks for the approval stage, this way the approver gets a set of tasks to complete before approving the request.
We will be using some of the products found in Ultimate Forms Enterprise bundle:
- Smart Action Pro - will allow us to create new list items on the child list
- User Property Field - will allow us to create fields with default values from Active Directory, so save time when filling out a form.
- Associated Tasks Field (Associated Items Field)- will allow us to create parent-child relationship between two lists and show the child list items on the parent list item
- Smart ID Pro – will allow us to create a unique id for every request
- Smart List Pro – will allow us to create tabbed interface by splitting the columns into tabs and grant permissions to tabs.
In our demo we will have two lists:
- Purchase Requests - this is where the users will place the purchase requests and the approvers will approve those requests.
- Approval Tasks - will hold the tasks for each purchase request.
The following steps will ensure you have the lists you need:
- created the Purchase Requests list from a custom list template
- Change the Title column name to Request ID.
- Add the following fields: Full Name (User Property Field), Email (User Property Field),Requested Item (Multi Line Text), Cost (Currency),
Quantity(Number), Approval (Choice), Approver Name (User Property Field) and Approver Email (User Property Field).
- created the Approval Taskslist from a tasks list template
- Add one field - Lookup To Purchase Request List , a lookup column to the ID field of the Purchase Requests list. This is a very important setting because this is how our Associated item field recognizes the parent-child link between the two lists, therefor the Associated Items Field should be created in the parent list only after the creation of the child list (Approval Tasks) and the creation of the lookup to the ID field of the parent list (Purchase Requests).
We are now ready to setup the rest
On the Purchase Requests list, create an ID template using Item ID Setting (under list settings) of Smart ID Pro to set the ID for the Request ID field:
Add an Approval Tasks Field (Associated Items field) to the Purchase Requests list, you might want to change the view you selected on the Associated Items Field settings, to show only few fields.
On the Purchase Requests list, use Smart List Pro to create two tabs (Tabs and tab permissions, under the Purchase Request list settings) :
- Request
- Approval
Each tab gets its own fields:
Add two rules to the Approval tab, to make it appear only after the user has filled the request tab. In our demo, we used a SharePoint group called Purchase Requests Approvers Group to limit the access to the Approval tab only to the approvers. You can use any SharePoint group, Active Directory group and users.
Add two rules to the Request tab, to make it read-only only after the user has filled the request tab and submitted the request.
On the Purchase Requests list, create two actions using Smart Action Pro Action Settings (Under the Purchase Request List settings, don’t forget to create the action column first on the action settings). Use the Create List Item Action to create the tasks on the Approval Tasks list.
And this is it! You now have a simple purchase request application which shows the approver on the approver tab an auto generated tasks (powered by Associated Items Field).
To test it, just create a new item on the Purchase Requests list, you should see only the Request tab available, fill out all the field and save the item. Then log in with the manager user and edit the list item, you should now see the Approval tab, click on it and you should see the auto generated tasks!