Showing results for 
Search instead for 
Did you mean: 
Super User
Super User

SubmitForm() does not update Set() variable item.

I copy a SP item into a set variable.  I load that variable into the item of a form.  I edit the data, then submit form.  I want the Set() variable to update with all of the form info.  It doesnt seem to be working.  I am using the same syntax as I would if it were a sharepoint item i'm editing.  Is this not possible?  I want the Set() updated with some other items before I write this into Sharepoint as a new item.  


Any ideas?

Super User
Super User

Re: SubmitForm() does not update Set() variable item.

Hi @martinav 

The SubmitForm function saves the form changes to the data source. So if you want to update the fields in your variable before saving it SharePoint as a new item, you'd need to Patch those changes before your call to SubmitForm.

If the call to SubmitForm succeeds, you can access the record that you added/edited through the LastSubmit property of the form. Therefore, if you Set your variable again in the OnSuccess property of your form, your variable will reflect the changes that you made in your form. The formula you would add to the OnSuccess property would look something like this:

Set(YourVariable, YourForm.LastSubmit)

Hope that makes sense, if not, I'd be happy to clarify.

Helpful resources

Better Together’ Contest Finalists Announced!

'Better Together’ Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.


Power Apps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!


Join THE global Microsoft Power Platform event series

Attend for two days of expert-led learning and innovation on topics like AI and Analytics, powered by Dynamic Communities

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020


Microsoft Business Applications Virtual Launch

Join us for the Microsoft Business Applications Virtual Launch Event on Thursday, April 2, 2020, at 8:00 AM PST.


Community Summit North America

Innovate, Collaborate, Grow - The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Top Kudoed Authors
Users online (8,905)