cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
StevenF19
Helper II
Helper II

Select(Parent) Not Working in Gallery

Hello,

 

I'm trying to build a gallery that will open up another form to edit an item but am having trouble getting Select(Parent) to work. The datasource of the gallery is a collection, and the gallery is located inside a datacard of a form. When creating an icon with the only OnSelect statement as Select(Parent) and a label with the text property set to GalleryName.Selected, the label is still blank when the icon is selected. I can't seem to get this to work. The gallery is in edit mode and the selectable property is set to true so I'm not sure what the issue is.

 

Thanks.

11 REPLIES 11
eka24
Super User
Super User

What you have to do is:

1. Select the EditForm and ln the Items property of the EditForm, put:
     Gallery1.Selected  (Change Gallery1 to your actual gallery name)

 

2. Dont put any formula on the icon inside the Gallery1

 

If it does not work take a screen shot

------------

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

Hi @StevenF19 

If the Items property of the gallery is a collection, then the edit form must have a lookup to the underlying datasource being modified, ie. the source of the collection.  Gallery1.Selected will not work.  It must be Lookup(datasource, ID=Gallery1.Selected.ID) to specify the record being edited.  I used ID as an example but it could be any unique field  in the dataset. 

StevenF19
Helper II
Helper II

Thanks for the quick replies guys, but I think there's a bit of a misunderstanding. The Parent(Select) formula doesn't work at all in the gallery. I can't select an item in the gallery at all. I put a label with the text property GalleryName.Selected to test that it doesn't work and it stays blank when I try selecting an item in the gallery.

Can you show a screen shot

Hi @StevenF19 

Gallery.Selected refers to a record.  You cannot display a record in a label.  Put Gallery.Selected.Fieldname  in your label.

Your gallery is inside a datacard in your form...is that correct?

 

It sounds like maybe your Form settings is what is not allowing you to select the item in the Gallery. Either take the Gallery out of the Form or you will need to make sure the Form mode is set to Edit or New...it can't be View and you be allowed to click anything inside the form. 

Here's the test icon (the navy +) in my gallery with the OnSelect property as Select(Parent):

pic1.png

 

 

Here's the test label I placed (highlighted in red) and the text property. If the select in the icon was working, there'd be notes from the item in the gallery in the red highlighted box.

pic2.png

I would suggest you take the gallery out of the form. I have found that even when you do sub-galleries it does not allow you select items from the gallery well...so I don't think the gallery inside the form card works well.

 

If you are worried about keeping the scrolling ability you can put the data on a scrolling screen and put the form in one canvas, gallery in one etc.

@StevenF19 

 

Agreed...your gallery is not letting you select anything. You need to remove it from the Form. Selecting inside a form (for a gallery) and selecting items in subgalleries do not work well....it would be best to remove the gallery from the card in your form if you want to select anything. 

 

It works fine in a form and in a subgallery if you are just providing it as information to show...not well as interactive.

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 (1,905)