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 Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Carousel_PP_768x460_Wave2 (1).png

2022 Release Wave 2 Plan

Power Platform release plan for the 2022 release wave 2 describes all new features releasing from October 2022 through March 2023.

365 EduCon 768x460.png

Microsoft 365 EduCon

Join us for two optional days of workshops and a 3-day conference, you can choose from over 130 sessions in multiple tracks and 25 workshops.

Top Solution Authors
Users online (3,086)