Dynamic view

When sorting or grouping items in SharePoint, sometimes more complex dynamic filtering is necessary. Here, the GetView() function with a dynamic view can be used. In this tutorial, you will learn how to do this.


Understanding the dynamic view

A dynamic view is created via the GetView() function that you can use straight inside SharePoint view filters. Before applying the filters, JungleDocs will process the GetView() function (or any other JungleDocs formulas) and replace them with real values which will be recognized by SharePoint.

Note: the context of the GetView() function will be used to process formulas in the dynamic view. In other words, if the GetView() function is used in a document, the document context (metadata) can be used to process the formulas in view filters. This provides the ability to use document columns in formulas.

In JungleDocs you can configure dynamic views with additional conditions. An example is GetView("TestList"; "FilteredDatesView") where FilteredDatesView is configured like that:

Note: additional filter parameters work only as an equal to condition and they should be combined by and operators.


Example

Imagine you have a Companies list, a Contacts list, and a Word Reports library for storing Word reports.

The Contacts list has a Company lookup column referring to the Companies list.

The Word Reports library also has a Company lookup column referring to the Companies list.

Now, let's say you want to create a report that displays a list of contacts for a specified company, and you want that report to appear in the Word Reports library. Here's how you do it.

1. First, create a Word document that you will later use as a template for a JungleDocs rule. In the document, use the  GetView() function and specify the Contacts list and the Filtered view as parameters: GetView("Contacts";"Filtered").

2. Create the Filtered view itself in the Contacts list and set a filter on the Company column. In view settings, a value in the Company column must be equal to the Company column in the Word Reports library.

3. In the Companies list, select a company, then open JungleDocs and create a new From Existing rule.

4. Give your rule a name (in our case it's Company Contacts) and set the Word Reports library as a target location (that's where reports will be saved).

5. Select Custom template, then click Manage custom template and upload the template that you've created in Step 1.

6. Save the rule by clicking OK.

7. Click on the newly created Company Contacts rule, and a document will be generated with all the contacts that belong to the company you selected:

You can also apply dynamic view for documents created from Small Parts. Read the tutorial here.

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.

Still need help? Contact Us Contact Us