cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

Re: Filter Variable

Mike8,

 

Thank you. I tried what you said but the filter still remains.

 

This is the code I have on the back button to homepage:

 

Navigate(HomeScreen,ScreenTransition.Fade); Set(SelectedPlatform, "")

 

Also, I even have this for OnVisible on the home screen:  Set(SelectedPlatform, "")

 

But the filter still persists... not sure why.

 

Thanks again.

Usman.

Mike8
Level 10

Re: Filter Variable

Hello Usman,

Can you please share the expressions you have at
1) One of the buttons on Screen1. For example the OnSelect property of the BI Central button
2) The OnSelect of the arrow in the gallery and of the clear flter of the screeen 2
3) The OnSelect of the arrow in the gallery, on Screen 3
?

Anonymous
Not applicable

Re: Filter Variable

Mike8,

 

Here it is:

 

1) Screen 1:

 

Navigate(ServicesScreen, ScreenTransition.Fade,{SelectedVertical: "BI Central"})

 

2) Screen 2:

 

Back Arrow: Navigate(HomeScreen,ScreenTransition.Fade); Set(SelectedPlatform, "")

 

Clear Filter: Navigate(ServicesScreen, ScreenTransition.Fade,{SelectedPlatform: ""})

 

3) Screen 3:

 

Filter Arrow: Navigate(ServicesScreen, ScreenTransition.Fade,{SelectedPlatform: FilterLabel.Text})

 

Thanks you.

Mike8
Level 10

Re: Filter Variable

Hello Usman,

Can you please try on screen 2, instead of what you have now, this:
Back Arrow: UpdateContext({SelectedPlatform:""});Navigate(HomeScreen,ScreenTransition.Fade)

View solution in original post

Anonymous
Not applicable

Re: Filter Variable

Mike8,

 

Thank you so much. This is working perfectly fine 🙂

 

One more thing, I am using the following code on my filter screen (screen 3):

 

Sort(Distinct('BI Services List_2',Platform), Result)

 

What can I add to this code or amend it in a way that filter screen only shows the Platform that correlated to the Vertical in Screen 1? For example, if I select "BI Central" in screen 1 - what should I add in the code above so that it only shows the platforms whose vertical in BI Central? 

 

Here's the code behind BI Central Button:

 

Navigate(ServicesScreen, ScreenTransition.Fade,{SelectedVertical: "BI Central"})

 

Or is there a way I can show "No Results found"in the gallery for Screen 2 if there is no result for the filter applied.

 

Thank you so much again for your help 🙂

 

Kind Regards,

Usman.

Anonymous
Not applicable

Re: Filter Variable

Hi Mike,

 

Thank you so much for your help the solution you gave worked but can you please help me with the problem I mentioned above... Would really appreciate it 🙂

 

Thanks.

Usman.

Mike8
Level 10

Re: Filter Variable

Hello Usman,
 
Yes, I will try. 🙂
Do you have a column that seperates the records in 'BI Services List_2' according what you select in the first screen? (BI central or Maritime Intelligence etc)
You need to use this column in the filter function.

Anonymous
Not applicable

Re: Filter Variable

Actually, no - there isn't any column that separates whats on the first screen. except the vertical (BI Central) itself... So, this is the code that I used on the button:

 

Navigate (ServicesScreen, ScreenTransition.Fade, {SelectedVertical: "BI Central"})

 

And following is the code that I used on the filter screen: 

 

Sort(Distinct('BI Services List_2',Platform), Result)

 

Is there any way where I can specify on the code above to whats there + the SelectedVertical = "BI Central" (or whichever button was clicked).

 

If this is not possible is there any way I can just display 'no results found' in the gallery for the applied filter?

 

Thank you 🙂

Mike8
Level 10

Re: Filter Variable

Hello Usman,

Then I am not sure how you can do it.
'BI Services List_2' should have an extra column in order to filter on it.
Can you please explain the structure of the 'BI Services List_2' table?

Anonymous
Not applicable

Re: Filter Variable

That's fine. It's basically vertical based app so there are some filters (platforms) that are used for BI Central and the same ones can be used my TMT and have few less or more... So, can I not tweak the code on filter screen (mentioned below) to only show Platforms whose vertical is the button clicked on the first screen. Just to make it clear in my SharePoint I have two separate columns for Platform and Verticals. 

 

Sort(Distinct('BI Services List',Platform), Result)

 

Thanks.

Helpful resources

Announcements
thirdimage

Power Apps Super User Class of 2020

Check it out!

thirdimage

Power Apps Community User Group Member Badge

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

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

SecondImage

Difinity Conference

The largest Power BI, Power Platform, and Data conference in New Zealand

Top Solution Authors
Top Kudoed Authors (Last 30 Days)
Users online (5,188)