cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Regular Visitor

deleting special characters without white space

Hi,

 

i'm trying to manipulate a string that is entered in a Text Input before submitting the content to the datasource.

I don't want to send special characters, but i need white spaces betweend the words and numbers.

 

after some research i have created this ugly formula here for the "submit"-Button:

Concat(Filter(Split(DataCardValue1.Text;"");IsMatch(Result;"^[a-zA-Z0-9\s]*$"));Result)

After this formula, the SubmitForm manages the data-saving-part - this works fine.

BUT ... white spaces were deleted out too - i need them!

 

in my research i learned, that the "\s" allows this white spaces...why are they deleted?

 

How can i save them?

 

2 ACCEPTED SOLUTIONS

Accepted Solutions
Highlighted
New Member

Re: deleting special characters without white space

Your formula is working correctly as you can see in the next image.

 

Maybe is a problem in your DDBB and it deletes blank spaces?

Capture.JPG

View solution in original post

Highlighted
Community Support
Community Support

Re: deleting special characters without white space

Hi @DavidHug ,

Do you only want to remove the special characters but the blank spaces are also removed by used the formula that you provided?
I've made a similar test but found that your formula works good for blank space.

Just as @earribasb  said.

Maybe you could try this formula:

Concat(Filter(Split(DataCardValue1.Text;"");IsMatch(Result;"^[a-zA-Z0-9\s]+"));Result)

If the problem still exists, then please tell me:

1)what is your data source?

2)what is this field data type?

3)how do you set that field?

4)the formula that you use to update?

 

The problem should be about updating or data source settings.

 

 

Best regards, 

Community Support Team _ Phoebe Liu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
Highlighted
New Member

Re: deleting special characters without white space

Your formula is working correctly as you can see in the next image.

 

Maybe is a problem in your DDBB and it deletes blank spaces?

Capture.JPG

View solution in original post

Highlighted
Community Support
Community Support

Re: deleting special characters without white space

Hi @DavidHug ,

Do you only want to remove the special characters but the blank spaces are also removed by used the formula that you provided?
I've made a similar test but found that your formula works good for blank space.

Just as @earribasb  said.

Maybe you could try this formula:

Concat(Filter(Split(DataCardValue1.Text;"");IsMatch(Result;"^[a-zA-Z0-9\s]+"));Result)

If the problem still exists, then please tell me:

1)what is your data source?

2)what is this field data type?

3)how do you set that field?

4)the formula that you use to update?

 

The problem should be about updating or data source settings.

 

 

Best regards, 

Community Support Team _ Phoebe Liu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Highlighted
Regular Visitor

Re: deleting special characters without white space

Hi @v-yutliu-msft,

 

thank you for your help.

I've changed so many things to make this work, so i forgot to delete my earlier version of the formula in the update property of the form i'm using. That was the problem. 😔

 

Thank you and @earribasb for testing my formula.

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Tech Marathon

Maratón de Soluciones de Negocio Microsoft

Una semana de contenido con +100 sesiones educativas, consultorios, +10 workshops Premium, Hackaton, EXPO, Networking Hall y mucho más!

Top Solution Authors
Top Kudoed Authors
Users online (5,904)