cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper I
Helper I

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
Highlighted
Super User
Super User

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
Highlighted
Super User
Super User

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

Highlighted
Super User
Super User

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!

Highlighted

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

Highlighted

What makes the Pop-up show?

Highlighted

I use this formula example:

 

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

 

in the seeting of the popup "Visible" : ShowPopup1

Highlighted

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. 

Highlighted

excatly, button is outside the gallery.

 

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

Highlighted

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. 

Highlighted

@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
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Community Highlights

Community Highlights

Check out the Power Platform Community Highlights

Top Solution Authors
Top Kudoed Authors
Users online (11,001)