cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
lliu_western
Resolver II
Resolver II

Substitute Certain Characters Before submitting values into SharePoint

Hello Community,

 

I have a form in PowerApps. The data on the form is submitted to SharePoint by clicking a save bottom.

 

The function goes:

OnSelect    -  SubmitForm(EditForm1)

 

PowerAutomate then kicks in to take all the values/column values from SharePoint and convert them into JSON then talk to API. 

 

The issue I am having is that I don't know when a user will type some characters in whichever field in the form and the character will break the JSON.

 

Is there any way I can update the form before the SubmitForm(EditForm1) action so all the data in the form doesn't contain any character that will break JSON?

 

Any advice will be great appreciated! 

1 ACCEPTED SOLUTION

Accepted Solutions
WarrenBelz
Super User
Super User

Hi @lliu_western ,

You should be able to do this in the Update property of the card the control is contained in. 

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

 

 

View solution in original post

2 REPLIES 2
WarrenBelz
Super User
Super User

Hi @lliu_western ,

You should be able to do this in the Update property of the card the control is contained in. 

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

 

 

Hi, @WarrenBelz , thank you for your reply.

 

I am trying it with the Update property now, but it seems like only allow me to use substitute with one value. Is it possible to substitute many special characters into one single value?

 

I am thinking of a function like  Substitute(DataCardValue17.Text,[Char(10), "$", "@", "!"],"-")

 

So have a nested values that I want it to replace of? 

 

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (4,873)