cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

Replace a character when it is entered into a Text Field

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

 

1 ACCEPTED SOLUTION

Accepted Solutions
Eelman
Super User
Super User

@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

 

View solution in original post

1 REPLY 1
Eelman
Super User
Super User

@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

 

View solution in original post

Helpful resources

Announcements
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

R2 (Green) 768 x 460px.png

Microsoft Dynamics 365 & Power Platform User Professionals

DynamicsCon is a FREE, 4 half-day virtual learning experience for 11,000+ Microsoft Business Application users and professionals.

Users online (5,773)