cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
lstan
Level: Powered On

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
Dual Super User
Dual Super User

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
Dual Super User
Dual Super User

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

lstan
Level: Powered On

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
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors
Users Online
Currently online: 349 members 6,260 guests
Please welcome our newest community members: