With Power Apps, the Char function takes a numeric ASCII code and returns the character representation.
Unfortunately, there's no built-in function to carry out the inverse of Char - that is, a function that returns the numeric ASCII code for an input character. It's useful to note that Excel VBA includes a function called ASC that carries out this task, and app builders familiar with Excel often search for a Power Apps equivalent.
To carry out this task, we need to write custom formula, and we can use the structure that's shown below.
We set inputString to the character to convert. As the screenshot beneath illustrates, the formula returns the correct ASCII code for the input character "a", which is 97.
To retrieve the ASCII code that corresponds to a given input character, the outer call to LookUp retrieves the numeric value for the target character value.
Power Apps provides no built-in function to convert an input character to an ASCII code (ie, an Excel VBA ASC equivalent). This post described a formula to carry out this task.