web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Unwanted text input clear
Power Apps
Answered

Unwanted text input clear

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hello everyone,

 

I have a small problem with text inputs in my gallery.

 

My gallery takes data from an SQL table, one field having the data type "money". Now I want to make this value editable in the gallery so I decided to display it in a text input field. That has worked fine without any formatting, but now I want to format the displayed values in the input field (and later restrict the allowed entry format) to show as currency, not just a plain number. 

 

After setting the default value of the wanted format, all fields showed as empty. I set the following, which worked fine for labels:

 

Text(ThisItem.MoneyField;"[$-de]###.###.##0,00")&"€"

 

Some testing revealed that the text input auto-clears whenever I enter something different than a number. So in the following examples, example 1 and 2 are fine but 3 is cleared (the comma being the decimal delimiter here):

  1. 10000
  2. 10000,00
  3. 10000€
  4. 10.000,00

Number 4 is slightly special in that I can remove [ &"€" ] from the above code, and it displays [10.000,00] correctly, but when I try to type it in manually, it removes the period instantly while typing (as it is not a digit or decimal delimiter, I suppose).

 

Is this behavior known and is there a way to properly display currency in a text input?

 

I appreciate any help or idea!

 

Edit: I can append the above code to another text input field as follows and it displays the formatted number properly

ThisItem.TextField & " " & Text(ThisItem.MoneyField;"[$-de]###.###.##0,00")&"€"

I would guess that Power Apps recognizes the first field referenced to be a number field somehow and restricts the permitted values but does not do so when the first field is text-based...

Categories:
I have the same question (0)
  • Verified answer
    RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @Anonymous 

    I believe what you are doing is that you have your textinput control set to be numeric and not allow non-numeric characters.  This will be the source of that issue you are seeing.  I also believe what you are trying to get is edit masking (allowing only certain input in a certain format) - this is not available today in PowerApps. 

    The best option is to allow any input in the control and then validate it and warn the user if there is an entry error (usually just a label warning under the text input that is visible only if the pattern in the input is invalid).

     

    I hope this is helpful for you.

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    @RandyHayes 
    Thank you for your reply! You are correct, I was not aware of the text input format option. It worked all fine after I noticed and fixed it.
    I also went for the approach to check the input for several possible format types with a regular expression and then unify these behind the scenes for the update to SQL.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Vish WR Profile Picture

Vish WR 610

#2
Haque Profile Picture

Haque 317

#3
WarrenBelz Profile Picture

WarrenBelz 315 Most Valuable Professional

Last 30 days Overall leaderboard