cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
keshamer
Advocate III
Advocate III

submitform compatible with a offline mode

Hi, submitform() is a cool function. but I would like to use it offline.

 

My idea was to create a local collection with onload and manipulate it with forms.

Even if powerapps tells me that I don't have a datasource on forms... it works.... but!!

I can't send it to my azure sql db. I thought that I could juste change the datasource in my local collection. but I can't find it in it. that would be so easy to juste change the name of the data source in the collection or have the scond parameter to the function like

 

submitform(name of the editform , change the data source optional ), I wil post it in the Idea.

 

But could someone help me to do that WITHOUT stock all the controllers value to a collection and collect or patch all of htem if cinnected, it is to heavy !!! half of my code is dedicated to the offline. A trick with submitform or with the form's collection would be so easy !!

1 REPLY 1
v-xida-msft
Community Support
Community Support

Hi @keshamer,

Based on the issue that you provided, I think you have some misunderstanding with the SubmitForm function in PowerApps.

The SubmitForm function could only be used within the Edit form control. The SubmitForm function is used to submit Form data into a data source which connects to your Edit form.

If you want to submit form data into your Azure SQL table using SubmitForm function, you must connect the Edit form to your Azure SQL table (Set the DataSource property of the Edit form control your Azure SQL table) rather than the Collection.

In addition, the Edit form could only be connected a Table data source, e.g. SQL table, SP list, Excel table, etc. Currently, within PowerApps, we could not connect a Edit form control to a Collection.

If you want to submit your Collection into your Azure SQL table using SubmitForm function, I afraid that there is no way to achieve your needs in PowerApps currently.

As an alternative solution, I think the Patch function could achieve your needs. More details about submitting Collection data into a SQL table, please check my response within the following thread:

https://powerusers.microsoft.com/t5/General-Discussion/Patch-a-Collection-to-SQL/td-p/156202

More details about the Patch function in PowerApps, please check the following article:

Patch function

 

Best regards,

Kris

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

Helpful resources

Announcements
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

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

R2 (Green) 768 x 460px.png

Microsoft Dynamics 365 & Power Platform User Professionals

DynamicsCon is a FREE, 4 half-day virtual learning experience for 11,000+ Microsoft Business Application users and professionals.

Users online (1,561)