In this video, we implement the Data Connector in Lightning Forms in order to provide a cross-site data lookup column within your SharePoint List Forms.
Lightning Forms Data Lookup
As well as refining the standard SharePoint lookup column, Lightning Forms offers the Data Lookup control that can lookup from lists across sites. This is useful if you already have a list in another site to lookup from, and you don’t want to duplicate that list for the purpose of a lookup column on your form. The user completing the form will need to have at least Read access to the list that you are looking up from.
To add a Data Lookup Column:
- Add a control to your form.
- From the Add dialog, click ‘Data Lookup’
- Provide a display name and an internal name for your column.
- Provide the Site URL for the site containing the list. e.g. https://lightning.sharepoint.com/sites/LightningToolsSoftware
- Select the list from the site that you wish to lookup from.
- Select the column that you would like to use in your Data Lookup column.
- Refine the other properties such as ‘Allow Multiple Values’, ‘Require that this column contains information’, and ‘Display as text only’
As of version 3.7.0.0, you can now select Teams as a Data Source for the Data Lookup. This data source gets values from the list of existing teams in the organization.
Note: To use the Teams data source, it is required to approve API access request with 'Team.ReadBasic.All' permissions in SharePoint admin center.
Field configuration for the Teams data source:
- Return all teams in the organization - The option returns all existing teams in the organization. If the option 'Return all teams in the organization' is unchecked, it returns only teams the current user is a member of.
- Filter query - Graph API query filter expression. More information about properties can be used you can read here. Examples:
startswith(displayName , 'Test')
displayName eq 'TestTeam'