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
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Difinity Conference 2022

Difinity Conference 2022

Register today for two amazing days of learning, featuring intensive learning sessions across multiple tracks, led by engaging and dynamic experts.

European SharePoint Conference

European SharePoint Conference

The European SharePoint Conference returns live and in-person November 28-December 1 with 4 Microsoft Keynotes, 9 Tutorials, and 120 Sessions.

Power Apps Ideas

Changes to Ideas Coming

We are excited to announce a new way to share your ideas for Power Apps!

Top Solution Authors
Top Kudoed Authors
Users online (3,577)