Skip to main content

Improved data source selection and Common Data Service views

We are excited to announce that we have added a new experience rolling out this week for selecting data sources in canvas apps and to allow using the Common Data Services views as a filter on entities.  Configuring a gallery or data table control is much easier with a prompt guiding the data source or connector to use.

With this new experience is an improved data access to Common Data Service and will soon include all of the recent connection improvements.  To streamline use of Common Data Service, the data source selection includes a list of suggested entities.  The ability to use entity views as a filter allows more advanced queries to be used without delegation limits.

Enabling the experimental flag

This new capability is available via an experimental flag in App settings under Advanced settings. Find “Improve data sources experience and Common Data Service views” under the Experimental section and turn the setting On.

Add settings Advanced Settings

Experimental improve datasource experience setting

If the “Explicit column selection” setting is enabled, it will need to be turned off before using this experimental feature. We are working to allow both to work together in an upcoming update.

Selecting a data source

When an gallery or data table control is inserted, a call out prompts for the data source to use. It will show data sources already used in this app, Common Data Service entities, and connectors.  Because the list of entities or connectors can be long, we show suggested items first and an action to see all of them.

Clicking a data source in this app or an entity will set the Items property which causes the default fields to be added.

When you search, we look across all sections in the call out to find matches.  This includes the matches within the full lists for Entities and Connectors.

Selecting an entity from Common Data Service

Selecting an entity will add to the In your app section and set the Items property.

Gallery control prompted for data source using call out

The same data source selection experience is used for the Items property picker in the property pane.

When the app has data sources, the data source picker shows those used in your app in the first section for easy access.

Adding other data sources from a connector

Under the Connectors section, the data source picker shows the connectors which have connections created in the environment.  By clicking on a connector the list of connections is shown and also allows creating a new connection.

For tabular connections clicking the new or existing connection will prompt for the location of the data.

PowerApps has a large number of connectors available. They are easily found using the data source picker search .  If a connection doesn’t exist, clicking the connector will prompt with the new connection panel.

New connector or new connections will select the resulting data source for the Items property and add into the data sources in the app.

Filtering a Common Data Service entity using a view

The Filter function now optionally takes a Common Data Service entity view as a parameter to provide filtering on the entity records.  Each entity contains an enumeration of the views.

When editing, the Filter formula continues to show the enumeration name.

When no longer editing, the Filter formula hides the enumeration name for easier reading.

When the entity view filter is nested within other functions, the query is combined together.  The view will always be executed on the server and additional delegable conditions will also be appended on the server to further reduce the view results.  Non-delegable conditions will happen client side like normal filtering.  Below is an example using a view and filtering based on a city taken from user input.

Data is returned in the order defined by the view unless Sort or SortByColumns function is used which overrides the view ordering.

Coming soon we will provide property pane support to allow selecting the view similar to selecting a data source.

Things to note

Use this list to successfully enable the Experimental option for your application.

  • Remove any existing Common Data Service connections. If you are working with an existing application that has a Common Data Service connection data sources, you must remove them before you can use this option. Remove the existing Common Data Service data sources and then turn on the Experimental option. Then, re-add the Common Data Service data source back again using the new data source selection experience.
  • Correct formulas showing an error. If you are working with an application that had an existing Common Data Service connection, you may find that some formulas will show a red X error icon for formulas that were correct. This is a known issue that will be fixed in a subsequent release. If the formula did not have the error before you started the conversion then the formula is still correct. To “fix” the formula, simply edit the formula by adding a space (or some other character) and then deleting it. The error should go away.
  • Multiple references with different names for the same data source. If your application references the same Common Data Service data source (e.g., Account) with two different names (e.g., Account & Account_1) then when you convert your application the formula will be in error. You will need to rename the data source to be the same in both formulas (e.g., Account).

Some additional notes about this option.

  • Common Data Service data sources are currently tied to the environment and require delete and re-adding if the app is moved to another environment.  Using the app’s current environment and selecting another environment will be added soon.
  • Not all Common Data Service entities are shown. There are a few infrequently used Common Data Service entities which are not show (e.g., Action card type, Action card user settings, … )
  • Full polymorphic and relationship support not at parity with latest Common Data Service connector.

 

We look forward to your feedback as we evolve the data source selection experience and provide expanded Common Data Service data access.  You can comment either via this post or on the PowerApps Community site