TakeColumnsFromView function

Applies to JungleDocs for SharePoint 2010-2019.
For JungleDocs for Office 365 tutorials, click here.

This article describes the formula syntax and usage of the TakeColumnsFromView function in JungleDocs.


Description

Returns column names and values from a specified SharePoint view.

Syntax

TakeColumnsFromView(recordSet; viewTitleOrUrl)

The TakeColumnsFromView function syntax has the following arguments:

  • recordSet   Required. Any function that returns a set of items (e.g., GetView, FindItems, ReportItems)
  • viewTitleOrUrl   Required. A view title or URL address.

Example

TakeColumnsFromView(ReportItems; ViewA1)

Returns column names and values from the ViewA1.

TakeColumnsFromView(FindItems("Contacts"; "Company"; "Contoso"); "AllCompanies")

Returns column names and values from the AllCompanies view in the Contacts list, filtered by Contoso in the Company column.

Using TakeColumnsFromView in a template

Let's say you have a SharePoint list configured like this:

If you simply want to retrieve all the column names and values from the view, create a repeated section and enter ReportItems in a content control set on the table row, with the following result:

However, if you want to retrieve values from the Custom View (which has only three columns), enter TakeColumnsFromView(ReportItems; "CustomView").

The result:

You may also want JungleDocs to group column names and values by the Content Type values. To do so, you will need to create a double repeated section:

1. Insert a content control in a template and enter the following function in content control properties:

GroupBy(ReportItems; "ContentType")

2. Insert a table inside the content control area.

3. Select the table, insert a content control and enter the following function in content control properties:

TakeColumnsFromView(GroupItems; IF(GroupTitle = "DocumentCT1"; "ViewForDocumentCT1"; GroupTitle = "DocumentCT2"; "ViewForDocumentCT2"; GroupTitle = "DocumentCT3"; "ViewForDocumentCT3"; "CustomView"))

The result:

As you can see, column values are grouped by the content type. In case JungleDocs finds no matching values in the If function, it will return columns from the Custom view.

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