cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Frequent Visitor

Multiple Records in a Form

 

Hi,

 

Is there possible to have a Gallery where I can select an Employee and to have a Form or a similar object where I can see ALL the Hobbies of the Selected Employee, to be able to edit them, to add other Hobbies and then save?

 

I have the Employee and Hobbies tables:

employeetable.JPG

 

hobbiestable.JPG

 

In PowerApps, I have a Gallery on top of the screen, where I can select the Employees, and in the Form below, I need to have all the Hobbies of the selected Employee and also the possibilities to edit the existing ones and to add new hobbies:

 

GalleryForm.jpg

This format is similar with having a list of Invoices, where you can select one Invoice and edit and add new records.

 

Thank you!

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Dual Super User III
Dual Super User III

Re: Multiple Records in a Form

You can easily add a gallery to the bottom of the screen and then set that gallery's items to be based on the selected item in the gallery on the top of the screen. Making the gallery editable and being able to insert a new record are more difficult, but definately doable. Here's a video explaining how to edit items in a gallery.

https://www.youtube.com/watch?v=okF03QzP-KM



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

View solution in original post

2 REPLIES 2
Highlighted
Dual Super User III
Dual Super User III

Re: Multiple Records in a Form

You can easily add a gallery to the bottom of the screen and then set that gallery's items to be based on the selected item in the gallery on the top of the screen. Making the gallery editable and being able to insert a new record are more difficult, but definately doable. Here's a video explaining how to edit items in a gallery.

https://www.youtube.com/watch?v=okF03QzP-KM



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

View solution in original post

Highlighted
Frequent Visitor

Re: Multiple Records in a Form

Thanks, @Pstork1.

I managed to add a new Gallery on the bottom with the details from the Hobbies.

I deleted the Labels from the Gallery and put TextBoxes instead, where users can edit hobbies.

 

On the Edit ones I put the following formula OnChange:

Patch('[dbo].[Hobbies]',{EmployeeID:ThisItem.EmployeeID,HobbyName:EditTextInput.Text,HobbyID:ThisItem.HobbyID})

 

On the Add one I put the following formula OnChange:

Patch('[dbo].[Hobbies]',{EmployeeID:Gallery2.Selected.EmployeeID,HobbyName:AddTextInput.Text})

Patch.JPG

I hope this helps someone who is looking for a similar solution Smiley Happy

 

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Find your favorite faces from the community presenting at the Power Platform Community Conference!

Watch Now

Experience what’s next for Power Apps

See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (9,396)