Skip to content

Commit 643a37b

Browse files
committed
Doc updates
1 parent d2de676 commit 643a37b

File tree

3 files changed

+9
-3
lines changed

3 files changed

+9
-3
lines changed

powerapps-docs/maker/canvas-apps/functions/function-patch.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ In these examples, you'll modify or create a record in a data source, named **Ic
100100

101101
| Formula | Description | Result |
102102
| --- | --- | --- |
103-
| **Patch(&nbsp;IceCream,<br>First( Filter( IceCream, Flavor = "Chocolate" ) ), {&nbsp;Quantity:&nbsp;400&nbsp;} )** |Modifies a record in the **IceCream** data source:<ul><li> The **ID** column of the record to modify contains the value of **1**. (The **Chocolate** record has that ID.)</li><li>The value in the **Quantity** column changes to **400**. |{&nbsp;ID:&nbsp;1, Flavor:&nbsp;"Chocolate", Quantity:&nbsp;400 }<br><br>The **Chocolate** entry in the **IceCream** data source has been modified. |
103+
| **Patch(&nbsp;IceCream,<br>Lookup( IceCream, Flavor = "Chocolate" ), {&nbsp;Quantity:&nbsp;400&nbsp;} )** |Modifies a record in the **IceCream** data source:<ul><li> The **ID** column of the record to modify contains the value of **1**. (The **Chocolate** record has that ID.)</li><li>The value in the **Quantity** column changes to **400**. |{&nbsp;ID:&nbsp;1, Flavor:&nbsp;"Chocolate", Quantity:&nbsp;400 }<br><br>The **Chocolate** entry in the **IceCream** data source has been modified. |
104104
| **Patch( IceCream, Defaults(&nbsp;IceCream ), {&nbsp;Flavor:&nbsp;"Strawberry"&nbsp;}&nbsp;)** |Creates a record in the **IceCream** data source:<ul><li>The **ID** column contains the value **3**, which the data source generates automatically.</li><li>The **Quantity** column contains **0**, which is the default value for that column in the **IceCream** data source, as the **[Defaults](function-defaults.md)** function specifies.<li>The **Flavor** column contains the value of **Strawberry**.</li> |{ ID:&nbsp;3, Flavor:&nbsp;"Strawberry", Quantity:&nbsp;0&nbsp;}<br><br>The **Strawberry** entry in the **IceCream** data source has been created. |
105105

106106
After the previous formulas have been evaluated, the data source ends with these values:

powerapps-docs/maker/canvas-apps/functions/function-update-updateif.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ Both **Update** and **UpdateIf** return the modified data source as a [table](..
4343
* *DataSource* – Required. The data source that contains the record that you want to replace.
4444
* *OldRecord* – Required. The record to replace.
4545
* *NewRecord* – Required. The replacement record. This isn't a change record. The entire record is replaced, and missing properties will contain *blank*.
46-
* **All** – Optional. In a collection, the same record may appear more than once. Specify the **All** argument to remove all copies of the record.
46+
* *All* – Optional. In a collection, the same record may appear more than once. Specify the **All** argument to update all copies of the record.
4747

4848
**UpdateIf**( *DataSource*, *Condition1*, *ChangeRecord1* [, *Condition2*, *ChangeRecord2*, ... ] )
4949

powerapps-docs/maker/canvas-apps/functions/function-updatecontext.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ Every context variable is scoped to a screen. If you want to define a context va
7272
| **UpdateContext( {&nbsp;Person:&nbsp;{&nbsp;Name:&nbsp;"Milton", Address:&nbsp;"1&nbsp;Main&nbsp;St"&nbsp;}&nbsp;} )** |Creates or modifies the context variable **Person**, setting its value to a record. The record contains two columns, named **Name** and **Address**. The value of the **Name** column is **Milton**, and the value of the **Address** column is **1 Main St**. |**Person** has the value of record **{&nbsp;Name:&nbsp;"Milton", Address:&nbsp;"1&nbsp;Main&nbsp;St"&nbsp;}&nbsp;}**.<br><br>Reference this record as a whole with the name **Person**, or reference an individual column of this record with **Person.Name** or **Person.Address**. |
7373
| **UpdateContext( {&nbsp;Person: Patch(&nbsp;Person,&nbsp;{Address:&nbsp;"2&nbsp;Main&nbsp;St"&nbsp;}&nbsp;) }&nbsp;)** |Works with the **[Patch](function-patch.md)** function to update the **Person** context variable by setting the value of the **Address** column to **2 Main St**. |**Person** now has the value of record **{&nbsp;Name:&nbsp;"Milton", Address:&nbsp;"2&nbsp;Main&nbsp;St"&nbsp;}&nbsp;}**. |
7474

75-
### Step-by-step example
75+
### Step-by-step example 1
7676
1. Name the default screen **Source**, add another screen, and name it **Target**.
7777
2. On the **Source** screen, add two buttons, and set their **[Text](../controls/properties-core.md)** properties so that one says **English** and the other says **Spanish**.
7878
3. Set the **[OnSelect](../controls/properties-core.md)** property of the **English** button to this expression:<br>**Navigate(Target, ScreenTransition.Fade, {Language:"English"})**
@@ -88,5 +88,11 @@ Every context variable is scoped to a screen. If you want to define a context va
8888
On the **Target** screen, the label appears in the language that corresponds to the button that you selected.
8989
10. Press Esc to return to the default workspace.
9090

91+
### Step-by-step example 2
92+
93+
1. Open the canvas app where you want to use this formula.
94+
1. Add a new blank screen by selecting **New screen** from the command bar.
95+
1. Add a button, and set its **[OnSelect](../controls/properties-core.md)** property to this formula: <br> **UpdateContext( { Name: "Lily", Score: 10 } )**
96+
9197
[Another example](../add-screen-context-variables.md)
9298

0 commit comments

Comments
 (0)