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

Gallery Navigation Not Working

Hi,

 

So I have encountered an issue in which I have a gallery and when I attempt to click the arrow in the gallery to navigate to the item within the SharePoint list, it does not do anything despite the 'On Select' field being set to 'Select.Parent'. Can anyone advise? Pictures below for reference.

 

Picture of Gallery:

Gallery Arrows.JPG

Picture of Arrow Properties:

Arrow Properties.JPG

 

I expect that when I click the arrow that I should be taken to an 'Edit Form' of the parent item from the SharePoint list.

 

Any suggestions would be appreciated.

 

Thanks

12 REPLIES 12
CraigFeg
Level: Powered On

Re: Gallery Navigation Not Working

Bump. Anyone?

Anonymous
Not applicable

Re: Gallery Navigation Not Working

Hi.

 

The Icon.OnSelect: Select(Parent) code only triggers the OnSelect code for the parent object, which in this case is the gallery. So, unless you have some Navigate() function calls on Gallery.OnSelect, clicking on the icon won't do anything at all. (Note that I used generic names for the objects.)

 

Have you created a screen and edit form already?

CraigFeg
Level: Powered On

Re: Gallery Navigation Not Working

Hi @Anonymous,

 

Really appreciate that! It seems to now work and navigate to the Edit Form in which I was expecting. However, the form is not populated with existing details (its a blank new form). I am assuming that this is also something to do with establishing a relationship between the two screens. As you can see below, this is my current properties screen for my Edit Form. Do you happen to know if I have to specify the "parent" anywhere within here?

 

Form Details.JPG

 

Thanks again for the help and I can confirm that the solution is to add navigation to the gallery by using the OnSelect code!

 

Craig

Anonymous
Not applicable

Re: Gallery Navigation Not Working

Glad to hear that.

 

As for the form, to be kind of pedantic, you don't need to establish a relationship between the two screens. Rather, you need to relate a specific record in the gallery to the edit form. There are a number of ways to do this but the easiest one is to just reference the selected record in the gallery in the Item property of your edit form. Something like this:

EditForm1.Item: Gallery1.Selected

By clicking on a record in the gallery (to be specific, anywhere on the template that's duplicated for a record, even on a button with Navigate), the user essentially selects that record. 

 

Also, the Select(Parent) code is a fairly recent addition, IIRC. It just seemed to be added in apps (including the ones I made pre-update) when PA was updated a couple months back. I don't know why but Select(Parent) became a default value. For the purposes of just making an edit form, I see no reason to reference Parent. Do keep in mind though that Select() is just a function to execute the OnSelect() code of the object passed. If you have a button, say Button2, in some other screen and Select(Button2) was executed, Button2.OnSelect will also be executed.

CraigFeg
Level: Powered On

Re: Gallery Navigation Not Working

Hi @Anonymous

 

So I am having a bit of a problem doing this still unfortunately 😞 

Here is how I have it set up currently. The sample code you referenced didn't seem to do the trick.

 

Browse Gallery OnSelect Properties:

BrowseGallery1 OnSelect.JPG

 

BrowseGallery Navigation Arrow OnSelect Properties:

BrowseGallery Next Arrow OnSelect.JPG

 

SharePoint Edit Form Properties:
SharePointForm1 Properties.JPG

 

Any suggestions on how I can amend this so that my form is populated with the record from the browse gallery? It seems to be doing it within the development environment but not within SharePoint once published. Not sure whether that tells me anything either!?

 

Kind Regards,

 

Craig

Anonymous
Not applicable

Re: Gallery Navigation Not Working

Well, having different behavior in Edit Mode and in View Mode is pretty weird and I still don't know how to handle that with my apps. It's kind of a "hope for the best" and "screw you PA" situation. Thankfully, that behavior is a bit sporadic.

 

So, a couple of points:

  • The form should work as it is now. Not sure why it won't.
  • Your BrowseGallery1.OnSelect should error out since your second argument should refer to a value. i.e. ScreenTransition is not enough. Use something like ScreenTransition.None or ScreenTransition.Fade
  • Because you're referring to your item using BrowseGallery1.Selected, you don't need to pass the item as a context variable anymore. i.e. {displayItem: ThisItem} is not needed.
  • On BrowseGallery1.NavigationArrow.OnSelect, try adding Select( Parent ); before everything and remove whatever you have for BrowseGallery1.OnSelect. The PA dev team always tweaks some things whenever they put up some updates and it might have been something I missed.

 

Also, can you elaborate more on:


@CraigFeg wrote:

It seems to be doing it within the development environment but not within SharePoint once published. Not sure whether that tells me anything either!?

 


 

I'm not sure what you're trying to say here. Sharepoint enviroment? Is that when you're using the app in View Mode? Also -- are you sure you published the latest version? You kind of have to re-publish the whole thing after a save.

 

P.S. I'm pretty sure I didn't give you sample code beforehand. I was just being nitpicky about things. Apologies if that confused you.

 

 

CraigFeg
Level: Powered On

Re: Gallery Navigation Not Working

I might have also been confusing you. What I meant to say was that it seems to work when running in the PA Studio (where you can develop the app) the output is shown below:

 

Gallery:

Browse Gallery SharePoint.JPG

 

Output in SharePoint:

Form in SharEPoint.JPG

 

Output in Studio:

Within Studio.JPG

 

As you can see, it works as expected in studio but not in SharePoint. I have also published the app after every save.

 

Strange!

Anonymous
Not applicable

Re: Gallery Navigation Not Working

That's definitely a bug. I'm sorry but I definitely can't help you with that. I have no idea what's going on.

 

I'm going to tag some people, hope they know what's going on and maybe escalate this if necessary.

 

@v-micsh-msft@v-monli-msft -- Any ideas why this doesn't work as expected?

CraigFeg
Level: Powered On

Re: Gallery Navigation Not Working

@v-micsh-msft @v-monli-msft , can either of you provide your thoughts 🙂

 

Thanks!

 

Craig

Helpful resources

Announcements
Better Together’ Contest Finalists Announced!

'Better Together’ Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

thirdimage

Power Apps Community User Group Member Badge

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

sixthImage

Join THE global Microsoft Power Platform event series

Attend for two days of expert-led learning and innovation on topics like AI and Analytics, powered by Dynamic Communities

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

thirdimage

Microsoft Business Applications Virtual Launch

Join us for the Microsoft Business Applications Virtual Launch Event on Thursday, April 2, 2020, at 8:00 AM PST.

thirdimage

Community Summit North America

Innovate, Collaborate, Grow - The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Top Kudoed Authors
Users online (6,899)