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:
Picture of Arrow Properties:
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.
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?
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?
Thanks again for the help and I can confirm that the solution is to add navigation to the gallery by using the OnSelect code!
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:
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.
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:
BrowseGallery Navigation Arrow OnSelect Properties:
SharePoint Edit Form Properties:
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!?
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:
Also, can you elaborate more on:
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.
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:
Output in SharePoint:
Output in Studio:
As you can see, it works as expected in studio but not in SharePoint. I have also published the app after every save.
Check out new user group experience and if you are a leader please create your group
Did you miss the call?? Check out the Power Apps Community Call here!
See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.
ISV Studio is the go-to Power Platform destination for ISV’s to monitor & manage applications post-AppSource publish.