Skip to content

Commit 319af26

Browse files
authored
Update function-char.md
1 parent 3f9c144 commit 319af26

File tree

1 file changed

+87
-87
lines changed

1 file changed

+87
-87
lines changed
Lines changed: 87 additions & 87 deletions
Original file line numberDiff line numberDiff line change
@@ -1,100 +1,100 @@
1-
---
2-
title: Char function | Microsoft Docs
3-
description: Reference information for the Char function in Power Apps, including syntax and examples
4-
author: gregli-msft
5-
manager: kvivek
6-
ms.service: powerapps
7-
ms.topic: reference
8-
ms.custom: canvas
9-
ms.reviewer: tapanm
10-
ms.date: 07/17/2020
11-
ms.author: gregli
12-
search.audienceType:
13-
- maker
14-
search.app:
15-
- PowerApps
16-
---
17-
# Char function in Power Apps
18-
19-
Translates a character code into a string.
20-
21-
## Description
22-
23-
The **Char** function translates a number into a string with the corresponding ASCII character.
24-
25-
## Syntax
26-
27-
**Char**( *CharacterCode* )
28-
29-
- *CharacterCode* - Required. ASCII character code to translate.
30-
31-
## Examples
32-
33-
| Formula | Description | Result |
34-
| --- | --- | --- |
35-
| **Char( 65 )** |Returns the character that corresponds to ASCII code 65. |"A" |
36-
| **Char( 105 )** |Returns the character that corresponds to ASCII code 105. |"i" |
37-
| **Char( 35 )** |Returns the character that corresponds to ASCII code 35. |"#" |
38-
39-
### Display a character map
40-
41-
1. On an empty screen in a tablet app, add a [**Gallery**](../controls/control-gallery.md) control with a **Blank Horizontal** layout, and then set these properties:
42-
43-
- **Items**: `Sequence( 8, 0, 16 ) As HighNibble`
44-
- **Width**: `Parent.Width`
45-
- **Height**: `Parent.Height`
46-
- **TemplateSize**: `Parent.Width / 8`
1+
---
2+
title: Char function | Microsoft Docs
3+
description: Reference information for the Char function in Power Apps, including syntax and examples
4+
author: gregli-msft
5+
manager: kvivek
6+
ms.service: powerapps
7+
ms.topic: reference
8+
ms.custom: canvas
9+
ms.reviewer: tapanm
10+
ms.date: 07/17/2020
11+
ms.author: gregli
12+
search.audienceType:
13+
- maker
14+
search.app:
15+
- PowerApps
16+
---
17+
# Char function in Power Apps
18+
19+
Translates a character code into a string.
20+
21+
## Description
22+
23+
The **Char** function translates a number into a string with the corresponding ASCII character.
24+
25+
## Syntax
26+
27+
**Char**( *CharacterCode* )
28+
29+
- *CharacterCode* - Required. ASCII character code to translate.
30+
31+
## Examples
32+
33+
| Formula | Description | Result |
34+
| --- | --- | --- |
35+
| **Char( 65 )** |Returns the character that corresponds to ASCII code 65. |"A" |
36+
| **Char( 105 )** |Returns the character that corresponds to ASCII code 105. |"i" |
37+
| **Char( 35 )** |Returns the character that corresponds to ASCII code 35. |"#" |
38+
39+
### Display a character map
40+
41+
1. On an empty screen in a tablet app, add a [**Gallery**](../controls/control-gallery.md) control with a **Blank Horizontal** layout, and then set these properties:
42+
43+
- **Items**: `Sequence( 8, 0, 16 ) As HighNibble`
44+
- **Width**: `Parent.Width`
45+
- **Height**: `Parent.Height`
46+
- **TemplateSize**: `Parent.Width / 8`
4747
- **TemplatePadding**: 0
4848
- **X**: 0
4949
- **Y**: 0
50-
51-
1. Inside that gallery, add a **Gallery** control with a **Blank Vertical** layout, and then set these properties:
52-
53-
- **Items**: `Sequence( 16, HighNibble.Value ) As FullCode`
54-
- **Width**: `Parent.Width / 8`
55-
- **Height**: `Parent.Height`
56-
- **TemplateSize**: `Parent.Height / 16`
50+
51+
1. Inside that gallery, add a **Gallery** control with a **Blank Vertical** layout, and then set these properties:
52+
53+
- **Items**: `Sequence( 16, HighNibble.Value ) As FullCode`
54+
- **Width**: `Parent.Width / 8`
55+
- **Height**: `Parent.Height`
56+
- **TemplateSize**: `Parent.Height / 16`
5757
- **TemplatePadding**: 0
5858
- **X**: 0
59-
- **Y**: 0
60-
61-
1. Inside the second (vertical) gallery, add a **Label** control, and set these properties:
62-
63-
- **Text**: `FullCode.Value`
59+
- **Y**: 0
60+
61+
1. Inside the second (vertical) gallery, add a **Label** control, and set these properties:
62+
63+
- **Text**: `FullCode.Value`
6464
- **Width**: `Parent.Width / 2`
6565
- **X**: 0
6666
- **Y**: 0
6767
- **Align**: `Center`
6868
- **FontWeight**: `Bold`
69-
- **Size**: 24
70-
71-
1. Inside the second (vertical) gallery, add another **Label** control, and set these properties:
72-
73-
- **Text**: `Char( FullCode.Value )`
74-
- **Width**: `Parent.Width / 2`
69+
- **Size**: 24
70+
71+
1. Inside the second (vertical) gallery, add another **Label** control, and set these properties:
72+
73+
- **Text**: `Char( FullCode.Value )`
74+
- **Width**: `Parent.Width / 2`
7575
- **X**: `Parent.Width / 2`
7676
- **Y**: 0
7777
- **FontWeight**: `Bold`
78-
- **Size**: 24
79-
80-
You've created a chart of the first 128 ASCII characters. Characters that appear as a small square can't be printed.
81-
82-
![First 128 ASCII characters](media/function-char/chart-lower.png)
83-
84-
What is going on here? Let's see how **FullCode.Value** gets its values. Let's begin with the outer horizontal gallery. Its **Items** property uses the **Sequence** function to create 8 columns, starting with 0 with increments of 16:
85-
86-
![Outer gallery illustrated](media/function-char/chart-lower-outer.png)
87-
88-
Nested within this gallery is another vertical gallery. Its **Items** property fills in the gap left by the increment of 16 from the outer gallery:
89-
90-
![Inner gallery illustrated](media/function-char/chart-lower-inner.png)
91-
92-
To show the extended ASCII characters, it is a simple matter of changing the starting point for the chart, set in the Sequence function for the outer gallery:
93-
94-
`Sequence( 8, 128, 16 ) As HighNibble`
95-
96-
![Extended ASCII characters](media/function-char/chart-higher.png)
97-
98-
Finally, to show the characters in a different font, set the **Font** property of the second label to a value such as **'Dancing Script'**.
99-
100-
![Dancing Script](media/function-char/chart-higher-dancing-script.png)
78+
- **Size**: 24
79+
80+
You've created a chart of the first 128 ASCII characters. Characters that appear as a small square can't be printed.
81+
82+
![First 128 ASCII characters](media/function-char/chart-lower.png)
83+
84+
If you want to see how **FullCode.Value** gets its values. Let's begin with the outer horizontal gallery. Its **Items** property uses the **Sequence** function to create 8 columns, starting with 0 with increments of 16:
85+
86+
![Outer gallery illustrated](media/function-char/chart-lower-outer.png)
87+
88+
Nested within this gallery is another vertical gallery. Its **Items** property fills in the gap left by the increment of 16 from the outer gallery:
89+
90+
![Inner gallery illustrated](media/function-char/chart-lower-inner.png)
91+
92+
To show the extended ASCII characters, it is a simple matter of changing the starting point for the chart, set in the Sequence function for the outer gallery:
93+
94+
`Sequence( 8, 128, 16 ) As HighNibble`
95+
96+
![Extended ASCII characters](media/function-char/chart-higher.png)
97+
98+
Finally, to show the characters in a different font, set the **Font** property of the second label to a value such as **'Dancing Script'**.
99+
100+
![Dancing Script](media/function-char/chart-higher-dancing-script.png)

0 commit comments

Comments
 (0)