Dynamic view

In JungleDocs for Office 365, the GetView function is used to resolve items using the SharePoint View configuration and allows the use of View sorting, grouping and filtering (static filter). However, when more complex dynamic filtering is needed, the GetView() function with dynamic view feature can be used.

A dynamic view is created by using the GetView function that is inserted in a SharePoint view filter. Before using the view filters, JungleDocs for Office 365 processes functions and replaces them with real values which are recognized by SharePoint. Since SharePoint does not "understand" JungleDocs formulas, this view will normally return zero results in  SharePoint. However,  it will work in the app.

Note: the context of a GetView() function will be used to process formulas in the dynamic view. This means that if GetView() 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.

Dynamic view example

Let's say we have a Companies List, a Contacts List and a Word Reports Library for storing Word reports. Our goal is to to be able to select any company in the list and then get all the contacts for this company displayed in a report.

The Contacts List has to have a Company Lookup Column referring to the Companies List. The Word Reports Library should also have a Company Lookup Column referring to the Companies List.

Now, we need to create a view in the Contacts list (in this example we name it Filtered) and set a filter on a Company column. The value in the Company column should be equal to the Company column in the Word Reports library.   

In order to configure a Word report template in the Word Reports Library which will display the list of contacts for the specified company, use the GetView() function and specify Contacts List and filtered view as parameters: GetView("https://yoursite.sharepoint.com/Lists/Contacts/";"Filtered")

Note: use a Rich Text content control for your GetView() configuration to be able to insert additional content controls inside. In the example image below, a Rich Text content control is inserted into the whole second table row with the GetView() function, and inside that content control there are additional content controls inserted in every column to take particular information from the Contacts list.

After creating a new Word report and choosing a company in the document properties, we get the result:


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