How to connect the Lightning Conductor content rollup web part

NOTE: This article is about the Lightning Conductor client-side web part for modern SharePoint pages in SharePoint Online only. If you’re using our classic Lightning Conductor in SharePoint on-premises classic pages, you can connect it to other Lightning Conductors, our SharePoint Chart web part, and SharePoint filter web parts using SharePoint’s built-in web part connections feature.

You already know that the Lightning Conductor is great for aggregating and displaying any SharePoint or Microsoft Graph content within SharePoint or Microsoft Teams. But did you know that you can now dynamically filter or format that data, or select a view, based on page or user context, or using one of our free Lightning Filters? We’ll explain the basics here, and get into some actual scenarios in future posts.

image

What can you connect the Lightning Conductor to?

There are currently three places from which the Lightning Conductor can consume a value:

From the page environment, the Lightning Conductor can consume values from four contextual properties:

  • Site properties
  • Current user information
  • Query string
  • Search

What parts of the Lightning Conductor can be connected?

The Lightning Conductor’s dynamic connections can currently be used in three ways:

  • Filter content
  • Format content
  • Select a view
  • Coming soon in v3.1: pass a parameter to a Microsoft Graph query

Use a connection to filter content

You can access dynamic filter connections either within the filter option for each column on the columns tab of the configuration wizard, in the Advanced Filter dialog, or even in the filter available from a displayed column header. Clicking on the filter icon for a column in the configuration wizard gives you this dialog:

image

You’ve always been able to create a filter this way, but now you can click on the little “plug” icon to create a dynamic connection.

image

Here, we can choose from any of the available dynamic sources. In this example, there’s another Lightning Conductor on the page, so that’s why “Lightning Conductor” appears in the dropdown. If there had been a Lightning Filters web part on the page, that would have also appeared here. In this example, we’re going to filter the Project column by a parameter in the URL. This could be useful if you want to create a single page for project details for any project, and the link to the page would contain the project name in the URL. So we’ll select Page Environment, and then the Query String property.

image

Then select Query Parameters.

image

And then because we’ve already created a blank URL parameter called project, that appears in the dropdown for us to select. See around 2:00 of the Lightning Conductor tutorial video linked below for more on creating a query string parameter.

image

Click Save, and then you’ll see that the normal text box in the filter dialog is now greyed out, since the filter value is coming from the dynamic connection.

image

Now when a URL is specified with ?project=ProjectA (for example), the items displayed in the Lightning Conductor will only be those where the Project field value is ProjectA.

Use a connection to format content

We’ve also added the same dynamic connection capability to the Lightning Conductor’s conditional formatting feature.

image

This means that you can do something like highlight a row or add an icon when the item or document is Created By the current user…

image

Note that you’ll want to use Like rather than = here, due to the way SharePoint stores the user information.

Use a connection to select a view

The third dynamic connection is available in the Lightning Conductor’s web part configuration pane on the right side of the page when in edit mode. The options are the same as above; you can see an example of this in the Lightning Conductor video linked below.

Try it for yourself!

There are some more examples shown in these videos:

Using Dynamic Data Connectors To Consume Connections To The Lightning Conductor SPFx CSWP

Lightning Filters – SharePoint Framework SPFx Dynamic Data Connector Filter Client Side Web Parts

The dynamic connection feature is available from version 3.0 of the Lightning Conductor client-side web part. If you already own the Lightning Conductor but have an earlier version, you can download the latest release here.

Related Posts
Clear Filters

Add Comment