Let's POWER Automate

From no-code to low-code

Menu
  • Expressions
  • Filters
  • General
  • Application specific solutions
    • Dataverse
    • Excel
    • Forms
    • Outlook
    • Planner
    • Power Apps
    • SharePoint
    • Teams
  • Triggers
  • Ready to use solutions
    • Approval Process Template
    • Task Delegation App
    • The Ultimate Power Automate expressions cheat sheet
    • Power Automate HTTP requests to SharePoint cheat sheet
    • Power Automate HTTP requests to Graph API cheat sheet
  • ABOUT ME
  • Get help with your flow
  • POWER PLATFORM SERVICES
Menu

Format number as a currency in Power Apps text input control

Posted on March 17, 2024March 17, 2024 by Tom

“I know how to show number as currency in a display mode, but what about edit mode in the Power Apps text input control?”


It’s quite easy to format a number you’re just showing in Power Apps. You take the number, apply the Text(…) function on it and define the desired format. But it gets a bit more complicated once you start working on an edit form. When you type in a number in the text input control, it’ll stay as a number for the whole time. No spaces, no decimal places, a number that might be harder to read the longer it gets. Wouldn’t it be nice if you could add some kind of formatting also on the edit form?

Power Apps number currency

Before we get to the solution, I should mention that it’s not a real time formatting. You’ll have to click outside of the control to format the number, but I still think it’s worth it.

Add format to the text input control

To format a number, you must connect it to some action – in this case it’s the OnChange property of the text input. Once you type in the number and change focus from the control, it’ll trigger the function.

Start with the text input control and set it to Text format. It can’t be just a number as you want to use the Text(…) function for the formatting.

As already mentioned, the format will be applied once you change focus from the control – on OnChange. But since you can’t self reference a control, use a context variable as a workaround.

In the example below I’m taking the contents of the control (Self.Text – the number), formatting it to separate thousands by a comma (US formatting) and adding “Kฤ” (representation of the Czech crown currency). Since in Czech we use spaces to separate thousands and not commas, I format it once more into the “cs” locale. You can find your locale in this list.

UpdateContext(
    {
        varFormat: Text(
            Value(Self.Text),
            "[$-en-US]#,### Kฤ",
            "cs"
        )
    }
)
Power Apps number currency

Apply the format

But as of now it won’t do anything visible, it just sets the context variable to the desired text. I still have to tell the control that it should show this variable content via Default.

Now, if you type in a number in such a field and deselect the control, it’ll format it.

Note: when storing the value in a SharePoint / Dataverse column, make sure that you store it in the right format! That could mean removing the formatting before you Patch(…) it.

Reset the value

Since you’re now using a variable in the Default of the text field, and the variable is set only OnChange, you should also take care of clearing it when needed. By clearing I mean setting the variable to Blank() or a specific value, e.g. in OnVisible property of the screen.

UpdateContext(
    {
        varFormat: Blank()
    }
)

Summary

It’s possible to make number in Power Apps more readable also in the edit mode of the text input, even include the currency sign. You can’t self reference the control to apply the formatting directly on the value, but you can use a small workaround with a context variable. Update the variable when users change the value in the field. Use the variable as the control’s Default. And don’t forget to reset it when needed.


๐Ÿš€ Master Power Automate

Join 2,000+ professionals getting actionable Power Automate tutorials, solutions, cheat sheets & tips every week.

No spam. Unsubscribe anytime.

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

๐Ÿš€ Master Power Automate

Join 2,000+ professionals getting actionable Power Automate tutorials, solutions, cheat sheets & tips every week.

No spam. Unsubscribe anytime.

Still exchanging emails to get things approved?

Use the Approval Process Template and the Task Delegation App to skip the hard part and deploy an automated, fully functional approval solution on a SharePoint list in minutes! And then the next one, and the next one...

Approval Template Preview โœจ Learn more โœจ

Turn ideas into flows with ease!

Grab the complete Power Automate Cheat Sheet Bundleโ€”everything you need to master expressions, SharePoint HTTP calls, and Graph API in Power Automate.

Cheat Sheet Bundle Preview โœจ Get the Cheat Sheets

Didn't find what you were looking for?
Need to adjust a solution to fit your needs?
Or would you just like to get an assistance from somebody with thousands of hours of experience with Power Automate?

Power Automate blogs worth visiting

Damien Bird
Dennis (Expiscornovus)
Paul Murana

©2025 Let's POWER Automate | Theme by SuperbThemes