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
Ignite 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Power Apps Africa Challenge 2022

Power Apps Africa Challenge

Your chance to join an engaging competition of Power Platform enthusiasts.

Super User 2 - 2022 Congratulations

Welcome Super Users

The Super User program for 2022 - Season 2 has kicked off!

September Events 2022

Check out all of these events

Attend in person or online, there are incredible conferences and events happening all throughout the month of September.

Users online (3,898)