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

help please, button to display gallery with selected field

Hi Guys,

 

being a littel powerApps practisioner, I would like to do something special in my app (IT Tool Library with each IT tool description) but how to do is a bit tricky.

 

I would like have a button (> on click , I navigate to another screen (which displays a filtered gallery)

please see image attached.

 

the problem is when i clicked on a button i can just use navigate option, but I would like to have 1 screen (named "Tool description") with a gallery, each time i click on a button, i navigate the same screen (named "Tool description"), and the gallery is updated based on filter;

 

Please advise.

Many thanks for your support,

 

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
EricLott
Level 10

Re: help please, button to display gallery with selected field

Is the button you're clicking on in a gallery? For example, you have a gallery of IT tools and you have a button in each gallery item and you want to click it to go to a description screen showing that tool's details?

For that, you can use this formula:

Select(Parent);
Navigate('Tool Description')

Then on the tool description screen, you'll have a gallery where the Items property is set to Gallery1.Selected (where gallery1 is the gallery from the previous screen).

You'll then be able to access all the data from the selected IT tool from the previous screen.

View solution in original post

16 REPLIES 16
EricLott
Level 10

Re: help please, button to display gallery with selected field

Is the button you're clicking on in a gallery? For example, you have a gallery of IT tools and you have a button in each gallery item and you want to click it to go to a description screen showing that tool's details?

For that, you can use this formula:

Select(Parent);
Navigate('Tool Description')

Then on the tool description screen, you'll have a gallery where the Items property is set to Gallery1.Selected (where gallery1 is the gallery from the previous screen).

You'll then be able to access all the data from the selected IT tool from the previous screen.

View solution in original post

Super User
Super User

Re: help please, button to display gallery with selected field

You can use do this by setting a variable. Example:

 

When you click Gallery 1 you want to select that items "Type" and filter Gallery 2 to only show items with that "Type"

 

Gallery 1 - OnSelect = Set(varType, ThisItem.Type)

 

Gallery 2 - Items = Filter(DataSource, Type=varType)

 

Hope this helps!

Mansoor88
Level: Powered On

Re: help please, button to display gallery with selected field

for time being, the button isn't linked with gallery but with a popup (with the function UpdateContext).

idea is good let me try and tell you if working or not.

 

thanks

Super User
Super User

Re: help please, button to display gallery with selected field

What makes the Pop-up show?

Mansoor88
Level: Powered On

Re: help please, button to display gallery with selected field

I use this formula example:

 

on select of the button  :UpdateContext({ShowPopup1:true})

 

in the seeting of the popup "Visible" : ShowPopup1

Super User
Super User

Re: help please, button to display gallery with selected field

The button is outside the gallery that you click to show the Pop-Up?

 

If you want to filter off a selection from the first gallery you will have to have something that the select in the gallery basically. You could set the variable and show the popup by selecting an item in the gallery instead of outside and that will give you what you need. 

Mansoor88
Level: Powered On

Re: help please, button to display gallery with selected field

excatly, button is outside the gallery.

 

The thing is, based on user friendly view, we prefer to have button outside like hypertext link.

Super User
Super User

Re: help please, button to display gallery with selected field

Basically you will have to have some way of selecting an item in Gallery 1 if you want to filter Gallery 2 off of it or there is no way of it knowing what you want it to do.

 

You can make the button in the gallery but only show on the one item that is selected in the gallery so the button only shows up once by setting the visible property of the button to "ThisItem.IsSelected" so you will then just see it on one item at a time.

 

I also use that IsSelected to make the item in my gallery that is selected have a different background color than the rest and the text a different color if it is the selected item. 

EricLott
Level 10

Re: help please, button to display gallery with selected field

@Mansoor88 

Could you provide a screenshot of your form? As @rebeccas said, you'll need something driving the filter and without having an item selected I'm having a hard time understanding how this would work.

Helpful resources

Announcements
New Ranks and Rank Icons in April

'New Ranks and Rank Icons in April

Read the announcement for more information!

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.

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

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