Skip to content

Commit e9f1716

Browse files
committed
Merge branch 'gregli-and' of https://github.com/MicrosoftDocs/powerapps-docs-pr into anneta-sundry
2 parents 22e4743 + e2399bb commit e9f1716

File tree

3 files changed

+29
-16
lines changed

3 files changed

+29
-16
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ The **ColorValue** function returns a color based on a CSS color string. Both n
2424

2525
The **RGBA** function returns a color based on Red, Green, and Blue color components. It also includes an Alpha component used for mixing colors of objects layered on top of one another. Alpha varies from 0 or 0% which is fully transparent and invisible to 1 or 100% which is fully opaque and completely blocks out layers below.
2626

27-
The **ColorFade** function returns a brighter or darker version of a color. The amount of fade varies from -1 which fully darkens a color to black, to 0 which has no impact on the color, to 1 which fully brightens a color to white.
27+
The **ColorFade** function returns a brighter or darker version of a color. The amount of fade varies from -1 or -100% which fully darkens a color to black, to 0 which has no impact on the color, to 1 or 100% which fully brightens a color to white.
2828

2929
## Syntax
3030
**Color**.*ColorName*
@@ -43,7 +43,7 @@ The **ColorFade** function returns a brighter or darker version of a color. The
4343
**ColorFade**( *Color*, *FadeAmount* )
4444

4545
* *Color* - Required. A color value such as **Color.Red** or the output from **ColorValue** or **RGBA**.
46-
* *FadeAmount* - Required. A number between -1 and 1. -1 fully darkens a color to black, 0 has no impact on the color, and 1 fully brightens a color to white.
46+
* *FadeAmount* - Required. A number between -1 and 1. -1 fully darkens a color to black, 0 has no impact on the color, and 1 fully brightens a color to white. You can also use a percentage, -100% to 100%
4747

4848
## Built in colors
4949

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

Lines changed: 26 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -23,28 +23,44 @@ Detects errors and provides an alternative value or takes action.
2323
> [!NOTE]
2424
> This function is part of an experimental feature and is subject to change. The behavior described here is only available when the *Formula-level error management* feature is turned on. This is an app level setting that defaults to off. To turn this feature on, navigate to the *File* tab, *App settings* in the left hand menu, and then *Experimental features*. Your feedback is very valuable to us - please let us know what you think in the [PowerApps community forums](https://powerusers.microsoft.com/t5/Expressions-and-Formulas/bd-p/How-To).
2525
26-
The **IfError** function tests each of its arguments in order for an error value, stopping when the first non-error value is found. The arguments after the non-error value is found are ignored and not evaluated.
26+
The **IfError** function tests one or more values until an error result is found. If an error is found, a corresponding value is returned. If no error is found, a default value is returned. In either case, the returned value might be a string to show, a formula to evaluate, or another form of result. The **IfError** function is very similar to the **If** function: **IfError** tests for errors, while **If** tests for **true**.
2727

28-
Use **IfError** to replace error values with a valid value. For example, if it is possible that user input may result in a division by zero, replace it with a 0 or other valid value that is appropriate for your app so that downstream calculations can proceed.
28+
Use **IfError** to replace error values with a valid value. For example, if it is possible that user input may result in a division by zero, replace it with a 0 or other valid value that is appropriate for your app so that downstream calculations can proceed. For example, a simple pattern is:
2929

30-
Use **IfError** in [behavior formulas](../working-with-formulas-in-depth.md) to perform actions, check the results for errors, and if needed take further actions or display an error message to the user with [**Notify**](function-showerror.md).
30+
```powerapps-dot
31+
IfError( 1/x, 0 )
32+
```
3133

32-
If all of the arguments to **IfError** result in an error, the value of the last argument is returned (which will be an error value).
34+
If the value of **x** is non-zero, the formula will return **1/x**. However, if **x** is zero, **1/x** will result in an error, and **IfError** will return 0 instead.
35+
36+
Use **IfError** in [behavior formulas](../working-with-formulas-in-depth.md) to perform an action and check for an error before continuing to perform additional actions. For example in this pattern:
37+
38+
```powerapps-dot
39+
IfError(
40+
Patch( DS1, ... ), Notify( "problem in the first action" ),
41+
Patch( DS2, ... ), Notify( "problem in the second action" )
42+
)
43+
```
44+
45+
If there is a problem with the **Patch( DS1, ... )** then the first **Notify** will execute and no further processing will occur and **Patch( DS2, ... )** will not happen. But if **Patch( DS1, ... )** succeeds then the second patch will happen, and the second **Notify** executed if there is a problem with it.
46+
47+
If no errors are found, the value of the optional *DefaultResult* is returned. If that argument is not provided, the value of the last *Value* argument evaluated is returned.
3348

3449
## Syntax
35-
**IfError**( *Value*, *Fallback1* [, *Fallback2*, ... ] )
50+
**IfError**( *Value1*, *Fallback1* [, *Value2*, *Fallback2*, ... [, *DefaultResult* ] ] )
3651

37-
* *Value* - Required. Formula(s) to test for an error value.
38-
* *Fallback(s)* - Required. The formulas to evaluate and values to return if previous arguments returned an error. *Fallback* arguments are evaluated in order up to the point a non-error value is found.
52+
* *Value(s)* - Required. Formula(s) to test for an error value.
53+
* *Fallback(s)* - Required. The formulas to evaluate and values to return if matching *Value* arguments returned an error.
54+
* *DefaultResult* - Optional. The formulas to evaluate if no errors were found.
3955

4056
## Examples
4157

4258
| Formula | Description | Result |
4359
| --- | --- | --- |
44-
| **IfError( 1, 2 )** |The first argument is not an error. It is returned and subsequent arguments are not evaluated. | 1 |
45-
| **IfError( 1/0, 2 )** | The first argument is returning an error value (due to division by zero). The second argument is evaluated resulting in a non-error value which is returned. | 2 |
60+
| **IfError( 1, 2 )** |The first argument is not an error. There are no other errors to check and no default return value was provided. The formula returns the last *value* argument evaluated. | 1 |
61+
| **IfError( 1/0, 2 )** | The first argument is returning an error value (due to division by zero). The second argument is evaluated and returned as the result. | 2 |
4662
| **IfError( 1/0, Notify( "There was an internal problem", NotificationType.Error ) )** | The first argument is returning an error value (due to division by zero). The second argument is evaluated which displays a messages to the user. The return value of **IfError** is the return value of **Notify**, coerced to the same type as the first argument to **IfError** (a number). | 1 |
47-
| **IfError( 1/0, 1/0, 2, 1/0, 3 )** | The first argument is returning an error value (due to division by zero). The second argument is evaluated, also resulting in an error value (another division by zero). The third argument is evaluated, which does not return in an error value which is returned. The fourth and fifth arguments are ignored. | 2 |
63+
| **IfError( 1, 2, 3, 4, 5 )** | The first argument is not returning an error, so its corresponding fallback is not evaluated. The third argument is not return an error either, so its corresponding fallback is not evaluated. The fifth argument has no corresponding fallback and is the default result which is returned since no errors were found. | 5 |
4864

4965
### Step by step
5066

powerapps-docs/maker/canvas-apps/working-with-cards.md

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -91,9 +91,6 @@ As another example, unlock the **ImageURL** card, and then add an **Image** cont
9191

9292
In the formula bar, set the **Image** property of this control to *TextBox*.**Text**, where *TextBox* is the name of the **Text input** control that holds the URL:
9393

94-
> [!TIP]
95-
> Press the Alt key to show the name of each control.
96-
9794
![](./media/working-with-cards/show-image.png)
9895

9996
And now we can see the images and edit their URLs. Note that we could have used **Parent.Default** as the **Image** property, but it wouldn't have updated if the user changed the URL.
@@ -133,7 +130,7 @@ Let's look at the controls that make up a basic data-entry card. The space betwe
133130

134131
![](./media/working-with-cards/dissect-card1.png)
135132

136-
Hold down the Alt key to show the names of the controls that make up this card:
133+
In this picture the controls within the data card have been labeled:
137134

138135
![](./media/working-with-cards/dissect-card2.png)
139136

0 commit comments

Comments
 (0)