Skip to content

Commit dbeedfb

Browse files
committed
Merge branch 'powercards-preview' of https://github.com/MicrosoftDocs/powerapps-docs-pr into powercards-preview
merges main
2 parents bfa61fb + 935ccf3 commit dbeedfb

21 files changed

+168
-227
lines changed

powerapps-docs/cards/make-a-card/connectors/connector-intro.md

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,28 @@ Connectors are an important part of Power Apps, allowing your card to talk to ot
1919

2020
For more information on Connectors in Power Platform, see [Connectors overview](/connectors/connectors).
2121

22+
## Prerequisites
23+
24+
- A [Power Apps](https://powerapps.microsoft.com/) account.
25+
- A card to add connectors to. For an example, see the [simple card tutorial](../../tutorials/hello-world-card.md).
26+
- Familiarity with the [Card Designer](../../make-a-card/designer-overview.md).
27+
28+
## Access connectors in cards
29+
30+
To access connectors in card:
31+
32+
1. Go to [Power Apps](https://make.test.powerapps.com/) and select **Cards (preview)**.
33+
1. On the left, select **Cards** and select the card you want to test add a connector to.
34+
1. On the left, select **Data**. Then select **+ Add data**.
35+
36+
:::image type="content" source="../../media/connector-intro/add-data-___location.png" alt-text="Screenshot of + Add data menu":::
37+
38+
You'll then be able to add a data source and see all available connectors.
39+
2240
## Types of connectors
2341

24-
Within Teams, only connections to Dataverse are available. You can connect to Dataverse tables for creating, reading, updating, and deleting records.
42+
Only connections to Dataverse are currently available. You can connect to Dataverse tables for creating, reading, updating, and deleting records.
2543

2644
Learn how to [create a card with data from Dataverse](../../tutorials/dataverse-card.md).
2745

28-
The other connectors are available within the Card Designer as they work in the Play Page. You can use the Play Page to share card instances and experiment with different data connections.
46+
The other connectors are available within the Card Designer, but functionality for them will be added in future updates.

powerapps-docs/cards/make-a-card/screens/use-screens.md

Lines changed: 27 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: Use screens (Preview)
3-
description: Learn how to build a card with multiple screens.
3+
description: Learn how to build with screens.
44
ms.date: 09/20/2022
55
ms.topic: article
66
author: iaanw
@@ -15,18 +15,40 @@ ms.collection:
1515

1616
[!INCLUDE[cards_preview_notice](../../includes/preview-include.md)]
1717

18-
Cards can have multiple screens that a user can navigate between using the **Back** and **Navigate** formulas or with a **Show Screen** type button. These screens can be used to show different UI for specific scenarios. For example, a polling card might have a screen to collect user responses and a screen to show the current aggregated poll results.
18+
Cards can have multiple screens. Each screen can show a different user interface for specific scenarios. For example, a polling card might have a screen to collect user responses and a screen to show the current aggregated poll results. Use buttons to let users switch between screens or use Power Fx formulas for more complex scenarios.
1919

2020
## Tree view
2121

2222
You can view the screens in your card and change properties of each screen using the tree view in the Card Designer.
2323

2424
:::image type="content" source="../../media/make-a-card/cards-tree-view.png" alt-text="Screenshot of tree view in Card Designer." border="false":::
2525

26+
## Make a new screen
2627

28+
1. Open the **Tree View** for your card and select **+ New screen**.
29+
1. Enter a name for your new screen and select **Create** to make it.
30+
1. Add any controls, data, and variables you want to this screen. After you've added everything you wanted, you can use buttons to call your screen from a card.
2731

28-
## make multiple screens
32+
## Use a button to show a screen
2933

30-
## navigate between screens
34+
To show screens from other cards, use the **Show Screen** button.
3135

32-
placeholder
36+
1. Select **Insert** from the left. Then select **Input** then **Button** to create a new button.
37+
1. Go to **Type** in the Properties pane on the right. Select the drop-down and change the **Type** to **Show Screen**.
38+
1. **ShowCard** will appear on the right. Set **Screen** to the screen you want to show and set **Title** to the text to display on your button.
39+
40+
:::image type="content" source="../../media/make-a-card/show-card-properties.png" alt-text="Screenshot of ShowCard options." border="false":::
41+
42+
In the example above, this button will show the `NameScreen` screen when a user selects the button titled "Say Goodbye".
43+
44+
Now, the screen will appear when you test your card and select the button. The example below shows how the screen appears after adding an example button to the [simple card tutorial](../../tutorials/hello-world-card.md) card.
45+
46+
:::image type="content" source="../../media/make-a-card/screen-example.png" alt-text="Screenshot of an example screen in a card." border="false":::
47+
48+
Repeat this process as many times as needed to create more screens.
49+
50+
## Switch screens with Power Fx formulas
51+
52+
The Power Fx [Back](/power-platform/power-fx/reference/function-navigate#back) and [Navigate](/power-platform/power-fx/reference/function-navigate#navigate) functions let you switch between screens. While **ShowScreen** just shows a screen, these functions can be used outside of buttons and are appropriate for more complex screen-switching scenarios.
53+
54+
For more information about Back and Navigate, see the Power Fx reference documentation [syntax](/power-platform/power-fx/reference/function-navigate#syntax), [examples](/power-platform/power-fx/reference/function-navigate#examples), and [step-by-step instructions](/power-platform/power-fx/reference/function-navigate#step-by-step).

powerapps-docs/cards/make-a-card/testing/debugging-cards.md

Lines changed: 55 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -15,60 +15,83 @@ ms.collection:
1515

1616
[!INCLUDE[cards_preview_notice](../../includes/preview-include.md)]
1717

18-
Once you've created a card, you can view what your finished card will look like before sending it out to your teammates. This is done via the Play Page, which also has the tools to test your card and debug any issues.
18+
Use the **Play** page to see how finished cards will look and act before sending them out to users. It has the tools to test your card and debug any issues.
1919

20-
Note: Card instances and their data, which is what you see on the Play Page, will only last 48 hours after being created. Press the play button from the Card Designer to get a new instance of that card.
20+
> [!NOTE]
21+
> Card instances and their data, which you see on the **Play** page, will only last 48 hours after being created. Select the **Play** button from the Card Designer to get a new instance of that card.
2122
22-
## Play page intro
23+
## Prerequisites
2324

24-
The play page is made up of a few different components:
25+
- A [Power Apps](https://powerapps.microsoft.com/) account.
26+
- A card to test. For an example, see the [simple card tutorial](../../tutorials/hello-world-card.md).
27+
- Familiarity with the [Card Designer](../designer-overview.md).
2528

26-
- Card title
27-
- View mode
28-
- Card viewer
29-
- Customize button
30-
- Debug pane
29+
## Access the **Play** page
3130

32-
## Set up debugging
31+
To access the Play page:
3332

34-
1. Create a card
33+
1. Go to [Power Apps](https://make.test.powerapps.com/) and select **Cards (preview)**.
34+
1. On the left select **Cards** to see all of your cards. Select the card you want to test and debug.
35+
1. Select the **Play** button at the top of the page. A new window will appear with the Play page.
3536

36-
1. Go to **Variables** and select **New variable**.
37+
:::image type="content" source="../../media/debugging-cards/play-button-in-designer.png" alt-text="Screenshot of the **Play** button in the Card Designer":::
3738

38-
1. In this example, create the following two variables:
39+
## **Play** page components
3940

40-
| Variable | Type |
41-
| ------------- | ------ |
42-
| `title` | String |
43-
| `valuesArray` | Array |
41+
The **Play** page is made up of the following components:
4442

45-
1. When creating each variable, select the **Advanced settings** drop down in the variable making pane. Under **Input**, select **Required**.
43+
:::image type="content" source="../../media/debugging-cards/play-page-elements.png" alt-text="Screenshot of the Play page elements":::
4644

47-
1. Once you've created both variables, save your card.
45+
1. Card title - The title of the card
46+
1. View mode - Switch between light and dark modes to see how cards looks in different environments.
47+
1. Card viewer - Interact with and view the card.
48+
1. Send button - Send the card in Teams with a link.
49+
1. Debug pane - Displays important debugging information while testing. For more information, see the [debugging](#debug-your-card) section.
4850

49-
1. Now that you have variables, add them to your card. In this example, add the following code to:
51+
## Test your card
5052

51-
1. Title block: `${title}`
53+
Now that you're on the Play page and understand the different elements of it, you can test your card. The example used in this section is from the [simple card tutorial](../../tutorials/hello-world-card.md).
5254

53-
1. Text block: `${valuesArray}`
55+
Try interacting with your card. In the example below, the **Say Hello** button is used to fill a variable with the user's text input. Notice how the bot's title changes to the user input.
5456

55-
:::image type="content" source="../../media/debugging-cards/add-vars-to-card.png" alt-text="Screenshot of variables added to the card for debugging":::
57+
Before interacting with the card:
5658

57-
1. Save and play your card.
59+
:::image type="content" source="../../media/debugging-cards/card-before-interaction.png" alt-text="Screenshot of the card before interacting with it":::
5860

59-
1. The first time you open the Play page, you’ll be prompted with the Customize Card pane. Enter the values for the required variables you created, then select **Done**.
61+
After interacting with the card:
6062

61-
:::image type="content" source="../../media/debugging-cards/customize-card-popup.png" alt-text="Screenshot of the customize card popup, allowing values to be added to required variables for debugging." border="false":::
63+
:::image type="content" source="../../media/debugging-cards/card-after-interaction.png" alt-text="Screenshot of the card after interacting with it":::
6264

63-
1. If you need to edit any of these values later, you can do so by selecting **Customize** on the Play Page.
65+
You can also change the **View** button on the **Play** page to switch between light and dark modes. The example below is the same card in dark mode:
6466

65-
> [!NOTE]
66-
> The Customize Card pane will only appear on first viewing of the card after you’ve set up the variables. On subsequent views of the Play Page, you’ll only be prompted with this pane if you add a new required variable to the card.
67+
:::image type="content" source="../../media/debugging-cards/dark-mode-card.png" alt-text="Screenshot of the card in dark mode":::
6768

68-
1. The values you provided will now show up on your card.
69+
If you encounter issues while testing your card, use the [Debug](#debug-your-card) panel to try and fix them.
6970

70-
:::image type="content" source="../../media/debugging-cards/added-vars-shown.png" alt-text="Screenshot of added required variable values in card play page":::
71+
## Debug your card
7172

72-
## Debugging pane
73+
The **Debug** panel lets you ascertain issues with your card and gives suggestions when possible for fixes.
7374

75+
To open the **Debug** panel, select the **Debug** button on the right. There are four elements to the debug panel: **Memory**, **JSON**, **Output**, and **Info**.
7476

77+
### Memory
78+
79+
The **Memory** section lets you see variables stored in memory and how your card is assigning and using them.
80+
81+
The example below shows that the user input stored in `UserAnswer` has the same value as the assigned variable `UserName` used in the card.
82+
83+
:::image type="content" source="../../media/debugging-cards/memory-example.png" alt-text="Screenshot of the Memory section in the Debug panel":::
84+
85+
If you're encountering issues with memory, check your variable names and any related Power Fx formulas used in your card.
86+
87+
### JSON
88+
89+
The **JSON** section lets you see the JSON representation of your card. This can be helpful for developers working on cards who prefer a code-first approach.
90+
91+
### Output
92+
93+
The **Output** sections lets you see any output from your card. This is only available for cards where output is set up already.
94+
95+
### Info
96+
97+
The **Info** section lets you see information about the card's **Environment ID**, **Card ID**, and **User**.

0 commit comments

Comments
 (0)