Skip to main content

Notifications

Community site session details

Community site session details

Session Id : 5OTU/3xT/EL6E0CFKGw2Yf
Power Apps - Building Power Apps
Answered

Trimming text in a user input box

Like (1) ShareShare
ReportReport
Posted on 18 Jul 2023 12:27:57 by 206

I found users adding spaces to the end of text input boxes for some reason, and this reared itself when looking to do comparisons on the data. 

 

What is the best method to avoid this at the application level?

 

Thanks

  • Verified answer
    MrAutomate Profile Picture
    206 on 18 Jul 2023 at 12:28:15
    Re: Trimming text in a user input box


    I hope this will save someone the time of looking through long videos.

     

    To trim text in a PowerApps text input box, you can use the Trim function. The Trim function removes all spaces from a string of text except for single spaces between words. If you want to remove all spaces from the input string, you can use the Substitute function.

     

    Here’s an example of how to use the Trim function on the update property of the card for your field: Trim (Field.Text)

     Once you do this, your SubmitForm function should submit the record and trim the field

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

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Congratulations to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard > Power Apps - Building Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 89 Most Valuable Professional

#2
MS.Ragavendar Profile Picture

MS.Ragavendar 60

#3
stampcoin Profile Picture

stampcoin 48

Overall leaderboard
Loading started