Use the Dataverse connector (Preview)
[This article is pre-release documentation and is subject to change.]
In this tutorial, you'll learn how to build a card that utilizes the Dataverse connector to show and update information about an Account.
- Connectors, specifically Dataverse
- More advanced Power Fx expressions
Prerequisites
- A Power Apps account.
- Familiarity with the Card Designer, variables, and Power Fx.
Tutorial
Create a card
Go to Power Apps and select Cards (preview) on the left.
Select + Create a card.
Enter "DataverseCard" under Card name and then select Create.
Add the Dataverse connector to the Accounts table
Go to the Data pane on the left-hand menu and select Add data
Select the Microsoft Dataverse connector, wait for it to configure the connection, press OK then select the Accounts table and press Select
Ask for the account name
Navigate to the Insert pane in the left-hand menu and add a Text label control, setting the Text to
Enter account nameAdd a Text input control
Add a button and set the Title to
See detailsNavigate to the Variables pane and select New variable
Set the variable name to
enteredAccountName, the type toText, and select SaveNavigate to the Tree View pane in the left-hand menu and select New screen
Set the name to
DetailsScreenand select CreateSelect the button and set the OnSelect property to
Set(enteredAccountName, textInput1); Navigate(DetailsScreen);
Show additional account details
In the DetailsScreen, set the Text property on the bolded text label that is added by default to
LookUp(account, 'Account Name' = enteredAccountName).'Account Name'Through the Insert pane, add a text label and set the Text property to
LookUp(account, 'Account Name' = enteredAccountName).'Account Number'Through the Insert pane, add a button and set the Text property to
"Search for a different account"and the OnSelect property toBack()
Change the account description
Navigate to the Insert pane in the left-hand menu and add a Text input control and button to your DetailsScreen
Set the button text to
"Update description"and the OnSelect property toPatch(account, LookUp(account, 'Account Name' = enteredAccountName), { Description: textInput2 })
List all accounts
On the main screen, add a text label
On the text label, set the Text property to
ThisItem.'Account Name'and set the Repeat for every property on the Advanced tab toaccount
Test the card
- Save the card by selecting the button on the top right. You should always save changes before playing an updated card. Then select Play.
The card will have two screens - the first screen lists all accounts and allows the user to type in the exact name of an account to see additional details, the second screen shows the account name and number as well as lets the user modify the description.
Feedback
Submit and view feedback for