cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Racheli
Helper V
Helper V

Delete space from text input

Hey,

I would like to clear the text input completely when I reset it.

As you can in the picture there's one annoying space and therefore the user can continue.

 

Racheli_0-1614171970504.png

 

 

Thanks

 

1 ACCEPTED SOLUTION

Accepted Solutions
timl
Super User
Super User

Hi @Racheli 

Most likely, it will be one of these two statements that is causing the space.

It's possible that the Char(13) branch of the if statement is outputting a carriage return, which would produce something that would look like a space in the text input control.

 

timl_0-1614177820379.png

To diagnose this issue further, I would add another text input control and set the text property to each of the highlighted statements to work out which one is producing the space. Once you determine the statement that produces the space, you could wrap the statement with a call to the Substitute function to remove the space.

Alternatively, another approach would be to wrap your entire statement around a call to the TrimEnds function to remove trailing spaces.

https://docs.microsoft.com/en-gb/powerapps/maker/canvas-apps/functions/function-trim

 

View solution in original post

3 REPLIES 3
timl
Super User
Super User

Hi @Racheli 

What's the default value of your item description text input control? Is it set to a single space?

Here is the default:

Racheli_0-1614175400307.png

No spaces as you see....

timl
Super User
Super User

Hi @Racheli 

Most likely, it will be one of these two statements that is causing the space.

It's possible that the Char(13) branch of the if statement is outputting a carriage return, which would produce something that would look like a space in the text input control.

 

timl_0-1614177820379.png

To diagnose this issue further, I would add another text input control and set the text property to each of the highlighted statements to work out which one is producing the space. Once you determine the statement that produces the space, you could wrap the statement with a call to the Substitute function to remove the space.

Alternatively, another approach would be to wrap your entire statement around a call to the TrimEnds function to remove trailing spaces.

https://docs.microsoft.com/en-gb/powerapps/maker/canvas-apps/functions/function-trim

 

Helpful resources

Announcements
PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

Microsoft Build 768x460.png

Microsoft Build is May 24-26. Have you registered yet?

Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.

May UG Leader Call Carousel 768x460.png

What difference can a User Group make for you?

At the monthly call, connect with other leaders and find out how community makes your experience even better.

Top Solution Authors
Top Kudoed Authors
Users online (3,723)