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 / Replace a character wh...
Power Apps
Answered

Replace a character when it is entered into a Text Field

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hello, 

 

I have a form I need users to fill out. 

 

There's a text input from the form where I would like to block every "-" character that it is entered in it. 

 

For example if someone enters "HMI-895" I want that the text input field from the form to convert that into "HMI895".

 

Is there any way to do that?

 

Thanks

 

Categories:
I have the same question (0)
  • Verified answer
    Community Power Platform Member Profile Picture
    Microsoft Employee on at

    @Anonymous 

    If this is all you are looking to replace then the Substitute() function could be all you need, like:

     

    Substitute( TextInput1, "-", "" )

     

    You would put this code in the Update property of your datacard. Here's a link to the docs regarding Substitute:

    https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-replace-substitute

     

  • niklasjegg Profile Picture
    505 on at

    @Anonymous  Hello!

     

    i am trying the same thing but i am not getting a result. I have a Form and the default value of my Text input is a variable. i want to Substitute the text in this text input for example german special letters. 

    Substitute(NewUser_Lastname_Input.Text,"ä","ae")

     

    I have this formula in the Update Property of my datacard but what formula do i need at the text input.

    I want to be able to automatically change letters like ä to ae when they are entered in this text input.

     

    Thank you for your help.

  • EddieE Profile Picture
    4,641 Moderator on at

    @niklasjegg 

    This is quite an old thread, try posting as a new thread so that more users can see it - plus you'll get more help that way 🙂

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 March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 536

#2
WarrenBelz Profile Picture

WarrenBelz 426 Most Valuable Professional

#3
Haque Profile Picture

Haque 305

Last 30 days Overall leaderboard