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 / HOW TO REMOVE SPACE IN...
Power Apps
Answered

HOW TO REMOVE SPACE IN TEXT INPUT WITHOUT SUBMITTING BUTTON

(0) ShareShare
ReportReport
Posted on by 195

Hi PowerApps Experts, 

Good day! 

I would like to ask for your help regarding on how to remove space using trim upon onChange.

 

I have a textinput named TextInput.1

on my default property:

varText

On my OnChange property:

UpdateContext({varText: Trim(Self.Text)})

Actually this solves the issue.

But 

I want the default that if a lookup variable named id is not empty it will display the gvCurrentRequest.Title. 
So to summarize: I need the trim to work every time I changed the ID on the TextInput. 

Because currently what happened to me is that, if the variable gvCurrentRequest.Title is not empty and I tried to input a new value on the TextInput. The trim doesn't work. It only works.

Thanks in advance for the help.

Categories:
  • Verified answer
    MVP-Phipps Profile Picture
    3,521 Super User 2024 Season 1 on at
    UpdateContext({varText: Trim(Self.Text)})

     It may be worth putting this code other than on the onchange property of the field. Ie a button when you submit the form or the on success property.

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 405 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 368

#3
WarrenBelz Profile Picture

WarrenBelz 244 Most Valuable Professional

Last 30 days Overall leaderboard