cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
dcastillo1
Helper I
Helper I

Saving Multiple Forms With One Save Button On Tabular Gallery Interface

Hello,

 

I have a tabular gallery interface and each screen has a form from the same table on it. How can I save all of these without using the submitform for each form on the save button? All of these forms are from the "Company" table. 

 

Here is the code on my OnSelect property of the save button:

 

SubmitForm(Form_General_Information);SubmitForm(Form_Company_Contacts);SubmitForm(Form_ST_Registrations_Filings);SubmitForm(Form_Additional_Information);SubmitForm(Form_Nexus_Analysis);
Set(
varCompanyRecord,
LookUp(
Companies,
lg_companyid = varCompanyRecord.lg_companyid
)

 

dcastillo1_0-1660671357773.png

Any help to be more efficient would be great!

 

Thanks.

3 REPLIES 3
RandyHayes
Super User
Super User

@dcastillo1 

If these are all the same record on the same table, then you will want to split the forms properly and only submit one.

To learn how to split forms properly, please take a look over this video which will explain how to do it and not break your form functionality.

 

I hope this is helpful for you.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

Thanks! That video helped. One thing though, if I have one field that is on multiple forms, how do I get this to save? If I do not update that field with the same text on each screen/form, the entry is not saved because the field may be empty on another form on a different screen. I hope that makes sense. 

 

Patch(Companies,Coalesce(varCompanyRecord,Defaults(Companies)), Form_General_Information.Updates, Form_Additional_Information.Updates, Form_Company_Contacts.Updates, Form_Nexus_Analysis.Updates, Form_ST_Registrations_Filings.Updates);

 

Any suggestions would be great!

 

Thanks.

RandyHayes
Super User
Super User

@dcastillo1 
Okay, but you are showing a Patch function for your forms now.  You don't want to be doing a patch to the Companies datasource, you want to be submitting your master form.

 

As for the common field, do you really want that to be editable on each form variation?

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

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,682)