You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: powerapps-docs/maker/canvas-apps/functions/function-colors.md
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -24,7 +24,7 @@ The **ColorValue** function returns a color based on a CSS color string. Both n
24
24
25
25
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.
26
26
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.
28
28
29
29
## Syntax
30
30
**Color**.*ColorName*
@@ -43,7 +43,7 @@ The **ColorFade** function returns a brighter or darker version of a color. The
43
43
**ColorFade**( *Color*, *FadeAmount* )
44
44
45
45
**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%
Copy file name to clipboardExpand all lines: powerapps-docs/maker/canvas-apps/functions/function-iferror.md
+26-10Lines changed: 26 additions & 10 deletions
Original file line number
Diff line number
Diff line change
@@ -23,28 +23,44 @@ Detects errors and provides an alternative value or takes action.
23
23
> [!NOTE]
24
24
> 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).
25
25
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**.
27
27
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:
29
29
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
+
```
31
33
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.
**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.
39
55
40
56
## Examples
41
57
42
58
| Formula | Description | Result |
43
59
| --- | --- | --- |
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 |
46
62
|**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|
Copy file name to clipboardExpand all lines: powerapps-docs/maker/canvas-apps/working-with-cards.md
+1-4Lines changed: 1 addition & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -91,9 +91,6 @@ As another example, unlock the **ImageURL** card, and then add an **Image** cont
91
91
92
92
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:
93
93
94
-
> [!TIP]
95
-
> Press the Alt key to show the name of each control.
96
-
97
94

98
95
99
96
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
133
130
134
131

135
132
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:
0 commit comments