Skip to content

Commit 5c098a6

Browse files
authored
Merge pull request #1398 from MicrosoftDocs/master
Publish: updated add-form, sample-app topics to match UI
2 parents 7806a8c + ba0d5c5 commit 5c098a6

18 files changed

+168
-211
lines changed
Lines changed: 40 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: Show, edit, or add a record from a table in a canvas app | Microsoft Docs
2+
title: Show, edit, or add a record in a canvas app | Microsoft Docs
33
description: Use a canvas-app form to show, edit, or add a record from a table in your data source.
44
author: emcoope-msft
55
manager: kvivek
@@ -14,95 +14,86 @@ search.audienceType:
1414
search.app:
1515
- PowerApps
1616
---
17-
# Show, edit, or add a record from a table in PowerApps
17+
# Show, edit, or add a record in a canvas app
1818

19-
To show all fields in a record, add and configure a **[Display form](controls/control-form-detail.md)** control in a canvas app. To edit any field in a record (or to add a record) and save your changes back to a data source, add and configure an **[Edit form](controls/control-form-detail.md)** control in a canvas app.
19+
In a canvas app, add and configure a **[Display](controls/control-form-detail.md)** form control to show all fields in a record, You can also add and configure an **[Edit](controls/control-form-detail.md)** form control to edit any field in a record, add a record, and save your changes back to a data source.
2020

2121
## Prerequisites
2222

23-
* Learn how to [add and configure a control](add-configure-controls.md) in PowerApps.
24-
* Download [this Excel file](https://az787822.vo.msecnd.net/documentation/get-started-from-data/FlooringEstimates.xlsx), which contains sample data for this tutorial.
25-
* Upload the Excel file to a [cloud-storage account](connections/cloud-storage-blob-connections.md), such as OneDrive for Business.
26-
* In a new or existing app, [add a connection](add-data-connection.md) to the **FlooringEstimates** table in the Excel file.
27-
* If you're using an existing app, [add a screen](add-screen-context-variables.md) to it.
23+
- Learn how to [add and configure a control](add-configure-controls.md) in PowerApps.
24+
- Download [this Excel file](https://az787822.vo.msecnd.net/documentation/get-started-from-data/FlooringEstimates.xlsx), which contains sample data for this tutorial.
25+
- Upload the Excel file to a [cloud-storage account](connections/cloud-storage-blob-connections.md), such as OneDrive for Business.
26+
- Create or open an app for phones, [add a connection](add-data-connection.md) to the **FlooringEstimates** table in the Excel file.
2827

29-
## Add a form, and show data
30-
1. Add a **[Drop down](controls/control-drop-down.md)** control, name it **ChooseProduct**, and set its **[Items](controls/properties-core.md)** property to this value:
28+
You can add a form to a tablet app, but it won't match this topic because the form will have three columns by default.
29+
30+
- If you open an existing app, [add a screen](add-screen-context-variables.md) to it.
3131

32-
**FlooringEstimates.Name**
32+
## Add a form, and show data
33+
1. On a blank screen, add a **[Drop down](controls/control-drop-down.md)** control, and name it **ChooseProduct**.
3334

3435
> [!NOTE]
3536
> If you're not sure how to add a control, rename it, or set a property, see [Add and configure controls](add-configure-controls.md).
3637
38+
1. On the **Properties** tab of the right-hand pane, set **Items** to `FlooringEstimates` and **Value** to `Name`.
39+
40+
![Set the form's Items property](./media/add-form/items-property.png)
41+
3742
The list shows names of flooring products from the data source.
3843

39-
2. Add an **Edit form** control, move it below **ChooseProduct**, and then resize the form to cover most of the screen.
44+
1. Add an **Edit** form control, move it below **ChooseProduct**, and then resize the form to cover most of the screen.
4045

4146
![Add a form](./media/add-form/add-a-form.png)
4247

4348
> [!NOTE]
44-
> This topic describes the **Edit form** control, but similar principles apply to the **Display form** control.
49+
> This topic describes the **Edit** form control, but similar principles apply to the **Display** form control.
4550
46-
3. Set the **[DataSource](controls/control-form-detail.md)** property of the form to **FlooringEstimates** and the **[Item](controls/control-form-detail.md)** property of the form to this formula:
51+
1. Set the form's **[DataSource](controls/control-form-detail.md)** property to **FlooringEstimates** and its **[Item](controls/control-form-detail.md)** property to this formula:
4752

48-
**First(Filter(FlooringEstimates, Name=ChooseProduct.Selected.Value))**
53+
`First(Filter(FlooringEstimates, Name=ChooseProduct.Selected.Value))`
4954

5055
This formula specifies that, after you finish configuring the form, it will show the record that the user selects in **ChooseProduct**.
5156

52-
4. In the **Data** pane, click or tap the checkbox for each field to show it.
57+
1. On the **Properties** tab of the right-hand pane, select **Edit fields**.
5358

54-
> [!NOTE]
55-
> If the **Data** pane is closed, open it by selecting the form in the left-hand pane and then clicking or tapping **Data** in the right-hand pane.
59+
![Edit fields](./media/add-form/edit-fields.png)
5660

57-
![Show fields on form](./media/add-form/checkbox.png)
61+
1. In the **Fields** pane, select **Add field**, select the check box for each field, and then select **Add**.
5862

59-
5. In the **Data** pane, drag the **Name** entry to the top of the list.
63+
![Add fields](./media/add-form/add-fields.png)
6064

61-
![Move a card](./media/add-form/drag-field.png)
65+
1. Select the ellipsis (...) next to **Add field**, select **Collapse all**, and then drag **Name** to the top of the list.
6266

63-
The **Edit form** control reflects your change.
67+
![Move field](./media/add-form/move-field.png)
6468

65-
![Name at top](./media/add-form/move-card-form.png)
69+
The **Edit** form control reflects your change.
6670

67-
## Set the card type for a field
68-
1. With the form selected, click or tap the card selector for **Price** in the **Data** pane.
71+
![Show form](./media/add-form/show-form1.png)
6972

70-
![Select card selector](./media/add-form/price-card2.png)
73+
## Set the card type for a field
74+
1. In the **Fields** pane, expand the **Price** field by selecting its down arrow.
7175

72-
2. Scroll down, and then click or tap the **View text** option to make the field read-only.
76+
1. Open the **Control type** list, and then select **Edit slider**.
7377

74-
![View text](./media/add-form/view-text.png)
78+
![Edit slider](./media/add-form/edit-slider.png)
7579

76-
The form reflects your change.
80+
In the form, the **Price** field shows a **Slider** control instead of a **Text input** control.
7781

78-
![Read-only number](./media/add-form/read-only.png)
82+
1. (optional) Follow the same process to change the control for the **Overview** field to an **Edit multi-line text** control.
7983

8084
## (Edit form only) Save changes
81-
1. In the left-hand pane, select the form, and then click or tap the ellipsis (...).
82-
83-
![Select the form](./media/add-form/select-form.png)
84-
85-
2. Click or tap **Rename**, and then rename the form **EditForm**.
86-
87-
3. Add a **[Button](controls/control-button.md)** control, and set its **[Text](controls/properties-core.md)** property to **Save**.
88-
89-
![Add a save button](./media/add-form/save-button.png)
90-
91-
4. Set the **[OnSelect](controls/properties-core.md)** property of the **Save** button to this formula:
92-
93-
**SubmitForm(EditForm)**
9485

95-
5. Open Preview mode by selecting the play button near the upper-right corner (or by pressing F5).
86+
1. Rename the form **EditForm**.
9687

97-
![Open Preview mode](./media/add-form/open-preview.png)
88+
1. Add a **[Button](controls/control-button.md)** control, and set its **[OnSelect](controls/properties-core.md)** property to this formula:
9889

99-
6. Change the name of a product, and then click or tap the **Save** button that you created.
90+
`SubmitForm(EditForm)`
10091

101-
The **[SubmitForm](functions/function-form.md)** function saves your changes to the data source with which you configured the form.
92+
1. Press F5 to open Preview, change the name of a product, and then select the button that you created.
10293

103-
7. (optional) Select the close icon to close Preview (or press Esc).
94+
The **[SubmitForm](functions/function-form.md)** function saves your changes to the data source.
10495

105-
![Close Preview](./media/add-form/close-preview.png)
96+
1. (optional) Close Preview by pressing Esc (or by selecting the close icon in the upper-right corner).
10697

10798
## Next steps
10899
Learn more about working with [forms](working-with-forms.md) and [formulas](working-with-formulas.md).

0 commit comments

Comments
 (0)