cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
lstan
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
Pstork1
Dual Super User III
Dual Super User III

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

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
Frequent Visitor

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
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

PA Community Call

Power Apps Community Call

Next call is happening on April 21st at 8a PST.

MBAS Carousel

Sign up for our May 4th event!

May the fourth be with you, join us online!

secondImage

Experience what’s next for Power Apps

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

Top Solution Authors
Top Kudoed Authors
Users online (87,236)