Upper

How to Use the Power Fx UpperĀ  Function in Power Apps

What is Power Fx?

Power Fx is a low-code programming language that’s used to build custom apps and automate workflows on the Power Platform. It’s designed to be easy-to-learn and accessible to non-programmers, while still allowing experienced developers to create complex solutions.

Power Fx is similar to Excel formulas, which many people are already familiar with. It uses a syntax that’s based on expressions, functions, and operators to manipulate data. Power Fx also has built-in connectors to connect to various data sources, such as SharePoint, Dynamics 365, and SQL Server.

What is the Upper Function?

The Upper function is one of the many functions available in Power Fx. As the name suggests, it’s used to convert a string to uppercase. The function takes a single argument, which is the string you want to convert.

Here’s the syntax for the Upper function:


Upper(string)


The Upper function returns a new string that’s the uppercase version of the input string. If the input string contains any non-alphabetic characters, such as numbers or symbols, they will remain unchanged.

How to Use the Upper Function

Using the Upper function in Power Apps is straightforward. Here’s a step-by-step guide:

1. Open the app that you want to add the Upper function to.

2. Select the control that contains the text value you want to convert. This could be a text input, label, or other text-based control.

3. In the formula bar, type the Upper function followed by the control’s Text property. For example, if your control’s name is TextInput1, the formula would be:


Upper(TextInput1.Text)


4. Press Enter or click the checkmark button to validate the formula.

5. Save and publish your app to see the changes.

That’s it! The text value in the control will now be converted to uppercase whenever the app runs.

Advanced Usage

The Upper function can also be used to convert only part of a string to uppercase. This is done by using other functions to extract the desired substring before applying the Upper function.

For example, let’s say you have a control that contains a full name, such as “John Smith.” You want to convert only the first name to uppercase. Here’s how you would do it:

1. Create a new variable in the app, such as firstName.

2. Set the variable’s value to the first name by using the Split function to extract it from the full name. The Split function splits a string into an array of substrings based on a specified delimiter. In this case, the delimiter is a space. Here’s the formula:


Set(firstName, Split("John Smith", " ")[0])


This formula sets the firstName variable to “John”.

3. Apply the Upper function to the firstName variable. Here’s the formula:


Upper(firstName)


This formula returns “JOHN”, which is the uppercase version of the first name.

4. Display the uppercase first name in a control by using the Text property. Here’s how:


Label1.Text = Upper(firstName)


This formula sets the text of Label1 to “JOHN”.

The Upper function is a powerful tool for manipulating text values in Power Apps. By using this function, you can easily convert strings to uppercase, whether it’s for an entire string or only part of it. With a little creativity, you can combine the Upper function with other functions to create even more complex solutions.

Power Apps Training Courses by G Com Solutions (0800 998 9248)