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

Tutorial

Create a card

  1. Go to Power Apps and select Cards (preview) on the left.

  2. Select + Create a card.

  3. Enter "DataverseCard" under Card name and then select Create.

Add the Dataverse connector to the Accounts table

  1. Go to the Data pane on the left-hand menu and select Add data

  2. 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

  1. Navigate to the Insert pane in the left-hand menu and add a Text label control, setting the Text to Enter account name

  2. Add a Text input control

  3. Add a button and set the Title to See details

  4. Navigate to the Variables pane and select New variable

  5. Set the variable name to enteredAccountName, the type to Text, and select Save

  6. Navigate to the Tree View pane in the left-hand menu and select New screen

  7. Set the name to DetailsScreen and select Create

  8. Select the button and set the OnSelect property to Set(enteredAccountName, textInput1); Navigate(DetailsScreen);

Show additional account details

  1. 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'

  2. Through the Insert pane, add a text label and set the Text property to LookUp(account, 'Account Name' = enteredAccountName).'Account Number'

  3. Through the Insert pane, add a button and set the Text property to "Search for a different account" and the OnSelect property to Back()

Change the account description

  1. Navigate to the Insert pane in the left-hand menu and add a Text input control and button to your DetailsScreen

  2. Set the button text to "Update description" and the OnSelect property to Patch(account, LookUp(account, 'Account Name' = enteredAccountName), { Description: textInput2 })

List all accounts

  1. On the main screen, add a text label

  2. On the text label, set the Text property to ThisItem.'Account Name' and set the Repeat for every property on the Advanced tab to account

Test the card

  1. 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.