Skip to content

Commit 9fb0bee

Browse files
committed
more updates for GregLi
1 parent e9f1716 commit 9fb0bee

File tree

3 files changed

+28
-23
lines changed

3 files changed

+28
-23
lines changed

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

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,18 +15,21 @@ search.app:
1515
- PowerApps
1616
---
1717
# Color enumeration and ColorFade, ColorValue, and RGBA functions in PowerApps
18+
1819
Using built in color values, defining custom colors, and Alpha blending.
1920

2021
## Description
21-
The **Color** enumeration is an easy way to access the colors defined by HTML's Cascading Style Sheets (CSS). For example, **Color.Red** returns a pure red color. The list of these colors is included at the end of this article.
22+
23+
The **Color** enumeration is an easy way to access the colors defined by HTML's Cascading Style Sheets (CSS). For example, **Color.Red** returns a pure red color. The list of these colors is included at the end of this article.
2224

2325
The **ColorValue** function returns a color based on a CSS color string. Both names of CSS colors such as "RosyBrown" and hex values such as "#bc8f8f" may be used.
2426

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.
27+
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.
2628

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.
29+
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).
2830

2931
## Syntax
32+
3033
**Color**.*ColorName*
3134

3235
* *ColorName* - Required. A Cascading Style Sheet (CSS) color name. See list below of possible enumeration values.
@@ -38,14 +41,14 @@ The **ColorFade** function returns a brighter or darker version of a color. The
3841
**RGBA**( *Red*, *Green*, *Blue*, *Alpha* )
3942

4043
* *Red*, *Green*, *Blue* - Required. Color component values, ranging from 0 (no saturation) to 255 (full saturation).
41-
* *Alpha* - Required. Alpha component, ranging from 0 (fully transparent) to 1 (fully opaque). You can also use a percentage, 0% to 100%.
44+
* *Alpha* - Required. Alpha component, ranging from 0 (fully transparent) to 1 (fully opaque). You can also use a percentage, 0% to 100%.
4245

4346
**ColorFade**( *Color*, *FadeAmount* )
4447

4548
* *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. You can also use a percentage, -100% to 100%
49+
* *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 from -100% to 100%
4750

48-
## Built in colors
51+
## Built-in colors
4952

5053
| Color enumeration | ColorValue with Hex Code | RGBA | Color Swatch |
5154
| --- | --- | --- | --- |

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

Lines changed: 18 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -14,53 +14,55 @@ search.audienceType:
1414
search.app:
1515
- PowerApps
1616
---
17+
1718
# IfError function in PowerApps
1819

1920
Detects errors and provides an alternative value or takes action.
2021

2122
## Description
2223

2324
> [!NOTE]
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+
> This function is part of an experimental feature and is subject to change. The behavior that this topic describes is available only when the *Formula-level error management* feature is turned on. This app-level setting is off by default. To turn this feature on, open the *File* tab, select *App settings* in the left hand menu, and then select *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).
2526
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+
The **IfError** function tests one or more values until it finds an error result . If the function finds an error, the function returns a corresponding value. Otherwise, the function returns a default value. In either case, the function might return a string to show, a formula to evaluate, or another form of result. The **IfError** function resembles the **If** function: **IfError** tests for errors, while **If** tests for **true**.
2728

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+
Use **IfError** to replace error values with valid values. For example, use this function if user input might result in a division by zero. Build a formula to replace the result with a 0 or another value that's appropriate for your app so that downstream calculations can proceed. Your formula can be as simple as this example:
2930

3031
```powerapps-dot
3132
IfError( 1/x, 0 )
3233
```
3334

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+
If the value of **x** isn't zero, the formula returns **1/x**. Otherwise, **1/x** produces an error, and the formula returns 0 instead.
3536

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+
Use **IfError** in [behavior formulas](../working-with-formulas-in-depth.md) to perform an action and check for an error before performing additional actions, as in this pattern:
3738

3839
```powerapps-dot
39-
IfError(
40-
Patch( DS1, ... ), Notify( "problem in the first action" ),
40+
IfError(
41+
Patch( DS1, ... ), Notify( "problem in the first action" ),
4142
Patch( DS2, ... ), Notify( "problem in the second action" )
4243
)
4344
```
4445

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+
If the first patch encounters a problem, the first **Notify** runs, no further processing occurs, and the second patch doesn't run. If the first patch succeeds, the second patch runs and, if it encounters a problem, the second **Notify** runs.
4647

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.
48+
If the formula doesn't find any errors and you've specified the optional *DefaultResult* argument, the formula returns the value of that you specified for that argument. If the formula doesn't find any errors and you haven't specified that argument, the formula returns the last *Value* argument evaluated.
4849

4950
## Syntax
51+
5052
**IfError**( *Value1*, *Fallback1* [, *Value2*, *Fallback2*, ... [, *DefaultResult* ] ] )
5153

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.
54+
* *Value(s)* - Required. Formula(s) to test for an error value.
55+
* *Fallback(s)* - Required. The formulas to evaluate and values to return if matching *Value* arguments returned an error.
56+
* *DefaultResult* - Optional. The formulas to evaluate if the formula doesn't find any errors.
5557

5658
## Examples
5759

5860
| Formula | Description | Result |
5961
| --- | --- | --- |
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 |
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 |
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 |
62+
| **IfError( 1, 2 )** |The first argument isn't an error. The function has no other errors to check and no default return value. The function returns the last *value* argument evaluated. | 1 |
63+
| **IfError( 1/0, 2 )** | The first argument returns an error value (due to division by zero). The function evaluates the second argument and returns it as the result. | 2 |
64+
| **IfError( 1/0, Notify( "There was an internal problem", NotificationType.Error ) )** | The first argument returns an error value (due to division by zero). The function evaluates the second argument and displays a message 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 |
65+
| **IfError( 1, 2, 3, 4, 5 )** | The first argument isn't an error, so the function doesn't evaluate that argument's corresponding fallback. The third argument isn't an error either, so the function doesn't evaluate that argument's corresponding fallback. The fifth argument has no corresponding fallback and is the default result. The function returns that result because the formula contains no errors. | 5 |
6466

6567
### Step by step
6668

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ Let's look at the controls that make up a basic data-entry card. The space betwe
130130

131131
![](./media/working-with-cards/dissect-card1.png)
132132

133-
In this picture the controls within the data card have been labeled:
133+
In this graphic, the controls within the data card have been labeled:
134134

135135
![](./media/working-with-cards/dissect-card2.png)
136136

0 commit comments

Comments
 (0)