Skip to main content

Notifications

Community site session details

Community site session details

Session Id : QlfbPtiCyPbhAQwCS/ejt7
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

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Warren Belz – Community Spotlight

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

Leaderboard > Power Apps - Building Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 431 Most Valuable Professional

#2
MS.Ragavendar Profile Picture

MS.Ragavendar 193

#3
Pstork1 Profile Picture

Pstork1 166 Most Valuable Professional

Overall leaderboard
Loading started