In this post I want to show you what’s possible with our new Enhanced Lookup field. Basically the Enhanced Lookup is a custom field type based on the SharePoint Lookup but with a lot of nice features when it comes to finding and selecting items from another list or displaying the connected items. To explain all the features I will use a simple example with a document library and tasks that are linked to a document.
To begin with I created 2 lists: One document library and one task list.
I wanted tasks to be linked to documents and vice versa, so I add a new enhanced lookup field to the document library and one to the tasks list.
The enhanced lookup field’s type is “Lookup (information already on this site, including search form)”.
In the document library I selected the task list from the same web as the source. Of course it’s also possible to select lists from another web (within the same site collection).
I selected the Task Name as the linked column and I also allowed multiple selection.
In addition to the Task Name I also wanted to display the Task Status, Assigned To and the Due Date.
I didn’t want to limit the results, but the results can be limited by content type and scope (All, No folder, Root elements, Root elements without folders). I wanted to open the linked tasks in a modal dialog and to display the tasks as a table and separated by a break if they are displayed in a view.
I didn’t need sums but I wanted to display the linked tasks ordered by due date.
In the display form I wanted to display a link to create new tasks.
That’s it for the Tasks field in the document library.
In the tasks list I also created an Enhanced Lookup field called “Contract” that links back to the document. In the task list I also changed the column order to display the Contract column second.
What I also had to do was to activate the “Sapiens.at.SharePoint interlink lookups” feature. This is important because if I create a new task and I select a document I also want the task to be displayed in the document form and that’s what this feature is for.
OK, let’s test the connection between the document library and the tasks list. First I uploaded a document and opened the documents display form.
In the display form I can now create a new task using the link in the Tasks field.
This opens the new form of a task in a modal dialog (as that’s what I configured) with the contract automatically selected.
I completed the task and saved it. The display form of the document now looks like this.
I created a few more tasks to show you the advantage of displaying the connected tasks in a table form.
I know it does not really make sense in this case but just to show you another feature of the Enhanced Lookup I added a number field to the task list to display the estimated work of a task.
I also changed the task lookup to display this new field and to show sums in the table.
This is what it looks like now.
This is what it looks like in the view.
Each task is displayed in a new row because I used a break <br/> as a separator in the field configuration (See above).
What I haven’t shown you yet is how to find and select lookup values. Until now this was not necessary because in the example above I always added new tasks and the connection from document to task and vice versa was set automatically.
The way I configured the task lookup it is also possible to choose from existing tasks when editing a document.
The Enhanced Lookup validates input immediately and suggests alternatives if the input is ambiguous.
It also provides a simple search dialog to search and select values. You can search using a keyword or a wildcard (*) to get all possible values.
These are basically all of the main features in the new Enhanced Lookup. If you wish to try it, click on “Try it for free” on the product page and you will receive a 30 day trial key.
Note: If you use SharePoint 2013 it’s important that you change the CSR Render Mode of the form web part to Server Render and select Server Render in the list views.