cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Oussama_mo
Regular Visitor

Form Submission for many records

Dear community, 

 

I am building an application and i want to submit a form for all the rows having a same Project nameCaptdure.JPG

 For example for all rows where Project="CASALIFE" i want to have the same information.

LookUp(PMproject; Project=Label8.Text; SubmitForm(Form1))

I did this but it doesn't work because everytime you want to submit you have THISITEM.

 

Can someone provide help please ?

1 ACCEPTED SOLUTION

Accepted Solutions
v-qiaqi-msft
Community Support
Community Support

Hi @Oussama_mo,

Have you solved your problem?

Do you want to submit multi records with the same Project?

Could you please share a bit more about your scenario?

 

I think @jcfDaniel has provided a correct direction, the Patch() function is more efficient.

If you insist on the form submission, I think you could considering multi forms and set each form with a single record with the same project.

 

For example, you have three records related to the same project, you could set the three forms Item property as below:

First(Filter(PMproject; Project=Label8.Text))
Last(FirstN(Filter(PMproject; Project=Label8.Text),2))
Last(Filter(PMproject; Project=Label8.Text))

Then you could add a submit button and set the OnSelect property as below:

Patch(DataSource, Defaults(DataSource),Form1.Updates,Form2.Updates,Form3.Updates)
Best Regards,
Qi

View solution in original post

2 REPLIES 2
jcfDaniel
Super User
Super User

Hi,

 

A form is usually used for one record. Are trying to pass values that are common to all rows that chare the same project name, is that is it?

 

If so, populate your app with the lables, textinputs and other controls you might need. Add a button, Also put your projects in a gallery.

 

Select your project from your gallery and do a forall in the button's on select. Something like:

 

ForAll ( Filter (YourTable, Project = MyGallery. Selected.Project ), Patch (....) )

 

ForAll function in Power Apps - Power Apps | Microsoft Docs

Regards. JD.
v-qiaqi-msft
Community Support
Community Support

Hi @Oussama_mo,

Have you solved your problem?

Do you want to submit multi records with the same Project?

Could you please share a bit more about your scenario?

 

I think @jcfDaniel has provided a correct direction, the Patch() function is more efficient.

If you insist on the form submission, I think you could considering multi forms and set each form with a single record with the same project.

 

For example, you have three records related to the same project, you could set the three forms Item property as below:

First(Filter(PMproject; Project=Label8.Text))
Last(FirstN(Filter(PMproject; Project=Label8.Text),2))
Last(Filter(PMproject; Project=Label8.Text))

Then you could add a submit button and set the OnSelect property as below:

Patch(DataSource, Defaults(DataSource),Form1.Updates,Form2.Updates,Form3.Updates)
Best Regards,
Qi

Helpful resources

Announcements
Super User 2 - 2022 Congratulations 768x460.png

Welcome Super Users

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

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.

<
Users online (4,017)