cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
pandaviking
Level: Powered On

Remove leading and trailing spaces from the text

Hello! 

I just discovered Power Apps! 

I want to remove leading and trailing spaces from Single Line Text Columns and was wondering if I could do this in Power Apps or if im in the wrong fourms for this.  In the example picture below, Under First Name I have an extra space at the end. What is the function to do this and where would I place this expression/formula/function to do so? Thank you!

Screen Shot 2017-12-14 at 4.15.30 PM.png

1 ACCEPTED SOLUTION

Accepted Solutions
PowerApps Staff CarlosFigueira
PowerApps Staff

Re: Remove leading and trailing spaces from the text

You can use the TrimEnds function on the Update property of the card (you may need to unlock the card first before you can change that property); this will not prevent the user from entering leading and trailing spaces on the text input (which is ok; while the user is typing, trailing spaces are ok, since they can be followed by "regular" characters), but when the item is saved to the data source, then the leading and trailing spaces will be removed.

ForumPost001.png

 

1 REPLY 1
PowerApps Staff CarlosFigueira
PowerApps Staff

Re: Remove leading and trailing spaces from the text

You can use the TrimEnds function on the Update property of the card (you may need to unlock the card first before you can change that property); this will not prevent the user from entering leading and trailing spaces on the text input (which is ok; while the user is typing, trailing spaces are ok, since they can be followed by "regular" characters), but when the item is saved to the data source, then the leading and trailing spaces will be removed.

ForumPost001.png