Skip to content

Data sources

Built-in data sources

By default, the following data sources are available:

"Available data sources"

Be careful, when you switch the data source in the property pane, all the previous data source properties are lost. We do this to avoid polluting the web part property bag with multiple useless configurations.

The 'SharePoint Search' data source retrieve items from the SharePoint search engine.

The SharePoint search is different from the Microsoft Graph search.

Source configuration

Setting Description Default value
Query text The input query text to pass to the search engine. This setting is not configurable directly in the data source options. To enable it, go to the third configuration page of the Web Part and select either a static or dynamic value (Ex: from a connected search box Web Part). See the connection documentation for more information on how to configure this option. This value can be then used in the Query template using the {searchTerms} token. Also this value can be a Keyword Query Language expression (KQL). None.
Query template The search query template to use. It allows you to use dynamic tokens according to the context or specifiy conditions that should always apply to the query. {searchTerms}
Result source ID Can be either a built-in result source ID listed in the dropdown, or a custom result source that you specify. Type the GUID of the result source, or the SCOPE and NAME, separated by \| (pipe character). For this to take effect, you must press 'Enter' to save the value. Valid scopes are SPSiteSubscription, SPSite, SPWeb. Examples:
  • SPWeb\|Local News
  • SPSite\|Contracts
  • SPSiteSubscription\|Intranet
LocalSharePointResults
Selected properties The SharePoint managed properties to retrieve from the results. They can be used with the same name in layouts and slots afterwards.

To add other managed properties to the list, clear out the dropdown list field and type or paste the name of your managed property and press return. This will add it to the list of selected properties in the query. Pasting a comma separated list of property names also work. You can validate the property is working by using the Debug layout.
  • Title
  • Path
  • DefaultEncodingURL
  • FileType
  • HitHighlightedProperties
  • HitHighlightedSummary
  • AuthorOWSUSER
  • owstaxidmetadataalltagsinfo
  • Created
  • UniqueID
  • NormSiteID
  • NormListID
  • NormUniqueID
  • ContentTypeId
  • UserName
  • JobTitle
  • WorkPhone
  • SPSiteUrl
  • SiteTitle
  • CreatedBy
  • HtmlFileType
  • SiteLogo
Sort settings Configure the sort settings of the data source. Properties listed in the dropdown are all static properties marked as 'Sortable' in the SharePoint search schema. However, it does not list all possible RefinableXXX or aliases fields. To use them, you must enter the value manually and press 'Enter' to validate. For a particular field, you can define if it should be used for initial sort (i.e. when the results are loaded for the first time) or be only available for users in the sort control (i.e. after the results are loaded). The sort control does not consider default sort fields (i.e. select them by default) and you can only sort on a single field at a time according the fields you defined. If no user sort fields are defined in the configuration, the sort control won't be displayed. None.
Refinement filters The initial refinement filters to apply to the query. Filters has to be written using FQL (Fast Query Language) (e.g. FileType:equals("docx")). They will be applied every time to the current search query regardless selected filters from connected Web Parts. Note: for string expressions, use " instead of '. None.
Language of the search request The language to use for the search request. By default the search request will be made using the current user interface language. This parameter is mainly used to process diacritics, plurals, etc. correctly according to the language. Current UI language.
Enable query rules Whether or not apply SharePoint query rules. False.
Enable audience targeting Whether or not results should be targeted according to the audiences that the current user belongs to. More information about modern audiences and how to configure them. False.
Enable localization If enabled, the Web Part will try to translate the taxonomy term IDs found in result item properties and refinement values to their corresponding label according to the curent UI language. To get it work, you must map a new refinable managed property associated with ows_taxId_ crawled property and turn this toggle 'on': If enabled and depending on how many items are currently being displayed, this could slightly decrease the loading performance.

To use translated values in your template, you must use the 'Auto + <property_name>' property format instead of the original property name. For instance, to use translated values of the 'owstaxidmetadataalltagsinfo' property, you must use the 'Autoowstaxidmetadataalltagsinfo' auto created property.
False.
Hit-highlighted properties The list of SharePoint managed properties (separated by a comma) to return hit highlighted information (whether the search query match each specified managed property or not).

Note: HitHighlightedProperties will be null if there is a field in Hit-highlighted properties doesn't exist in Selected properties

None.

The 'Microsoft Search' data source retrieve items from the Microsoft search engine.

This data source uses the Microsoft Search beta API that is not suitable for a production use. An enhanced version of this data source will follow when the GA version will be released.

Source configuration

Setting Description Default value
Entity types to search The entity types to search. See the Microsoft Search API documentation to see valid combinations. Drive items (SharePoint & OneDrive)
Query template A query template allowing to use tokens to set a base query the same way as SharePoint search. {searchTerms}
Use beta endpoint Flag to switch between v1.0 and beta Microsoft Graph endpoint. false
Sort settings Configure the sort settings of the data source. Properties listed in the dropdown are all static properties marked as 'Sortable' in the SharePoint search schema. However, it does not list all possible RefinableXXX or aliases fields. To use them, you must enter the value manually and press 'Enter' to validate. For a particular field, you can define if it should be used for initial sort (i.e. when the results are loaded for the first time) or be only available for users in the sort control (i.e. after the results are loaded). The sort control does not consider default sort fields (i.e. select them by default) and you can only sort on a single field at a time according the fields you defined. If no user sort fields are defined in the configuration, the sort control won't be displayed. None

Paging

The paging options are available for all data sources.

Setting Description Default value
Show paging Hide or display the paging control.
Number of items per page Specify the number of items to show per page.
Number of pages to display in range Determines the number of pages to display in range.
Hide navigation buttons (prev page, next page) Self explicit.
Hide first/last navigation buttons Self explicit.
Hide navigation buttons (prev, next, first, last) if they are disabled. Self explicit