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

Screen that filters the next screen

Hi,

 

I have a sharepoint list in wich I have data of my aircraft fleet. I need my app to do these:

1. A main screen in which I select my location (attached: main screen1)

2. I want a second screen with all the aircrafts located in that place sorted by registration plate (main screen1 style)

3. Also I want a third screen with a browse gallery already sorted by the choice I made in screen 1 and screen 2 (attached: browse screen)

 

My question is: Is there any way to previously filter a screen with my selection in the prior screen?

 

Thank you very much

 

3 ACCEPTED SOLUTIONS

Accepted Solutions
Dual Super User
Dual Super User

Re: Screen that filters the next screen

Hi @Anonymous 

 

Yes this could be achieved by setting up few variables. Please follow below steps:
 
1) Main Screen: You can set a variable with name "SelectedLocation"
 
Screen -> OnVisible: Set(SelectedLocation,"")
 
All the Button for different location:
Spain Button-> OnSelect: Set(SelectedLocation,"Spain")
France Button -> OnSelect: Set(SelectedLocation,"France")
 
2) On the Second Screen, please connect the data source with the data associated to your aircraft registration plate.
Suppose, the DataSource Name is "AircraftRegistration" and this contains a column named "Location"
 
Expression:
Filter(AircraftRegistration, Location = SelectedLocation)
If this data is displayed as a gallery(Gallery1) and based on gallery selected item, the third screen will be filtered.
 
3) Now the third screen, suppose the data source is "AircraftDetails", then your filter query will be modified as:
 
Filter(AircraftDetails,Location = SelectedLocation && AircraftRegistrationNumber = Gallery1.Selected.RegistrationNumber)
 
Hope this Helps!
 
If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

View solution in original post

K-A-R-L
Level 10

Re: Screen that filters the next screen

Hi @Anonymous ,


Try using the Distinct() Function:

In your case:

Distinct(Filter(AircraftRegistration, Location = SelectedLocation), PlateColumnName)

 

This will give the distinct values of Plate that fits the condition in the filter.

 

----------------------------------------------------------------------------
Thanks,
K-A-R-L


If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
If you thought this post was helpful, please give it a Thumbs Up.

 

View solution in original post

Dual Super User
Dual Super User

Re: Screen that filters the next screen

Hi @Anonymous 

 

In that case, you can modify the expression as:
 
Distinct(Filter(AircraftRegistration, Location = SelectedLocation),PlateNumber)
 
With this, your third screen formula will be modified as:
 
Filter(AircraftDetails,Location = SelectedLocation && AircraftRegistrationNumber = Gallery1.Selected.Result)

View solution in original post

5 REPLIES 5
Dual Super User
Dual Super User

Re: Screen that filters the next screen

Hi @Anonymous 

 

Yes this could be achieved by setting up few variables. Please follow below steps:
 
1) Main Screen: You can set a variable with name "SelectedLocation"
 
Screen -> OnVisible: Set(SelectedLocation,"")
 
All the Button for different location:
Spain Button-> OnSelect: Set(SelectedLocation,"Spain")
France Button -> OnSelect: Set(SelectedLocation,"France")
 
2) On the Second Screen, please connect the data source with the data associated to your aircraft registration plate.
Suppose, the DataSource Name is "AircraftRegistration" and this contains a column named "Location"
 
Expression:
Filter(AircraftRegistration, Location = SelectedLocation)
If this data is displayed as a gallery(Gallery1) and based on gallery selected item, the third screen will be filtered.
 
3) Now the third screen, suppose the data source is "AircraftDetails", then your filter query will be modified as:
 
Filter(AircraftDetails,Location = SelectedLocation && AircraftRegistrationNumber = Gallery1.Selected.RegistrationNumber)
 
Hope this Helps!
 
If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

View solution in original post

Anonymous
Not applicable

Re: Screen that filters the next screen

Hi @yashag2255,

 

Thank you very much for your answer, is perfect 🙂

But I have a problem with the second screen:

The registration plates appear sometimes several times and I would like to have each plate only once. Is there a way to eliminate duplicate values? 

K-A-R-L
Level 10

Re: Screen that filters the next screen

Hi @Anonymous ,


Try using the Distinct() Function:

In your case:

Distinct(Filter(AircraftRegistration, Location = SelectedLocation), PlateColumnName)

 

This will give the distinct values of Plate that fits the condition in the filter.

 

----------------------------------------------------------------------------
Thanks,
K-A-R-L


If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
If you thought this post was helpful, please give it a Thumbs Up.

 

View solution in original post

Dual Super User
Dual Super User

Re: Screen that filters the next screen

Hi @Anonymous 

 

In that case, you can modify the expression as:
 
Distinct(Filter(AircraftRegistration, Location = SelectedLocation),PlateNumber)
 
With this, your third screen formula will be modified as:
 
Filter(AircraftDetails,Location = SelectedLocation && AircraftRegistrationNumber = Gallery1.Selected.Result)

View solution in original post

Anonymous
Not applicable

Re: Screen that filters the next screen

Hi,

 

Many thanks! @yashag2255 It works perfectly 🙂

 

Salamat Po @K-A-R-L  pinaka solusyon! 🙂

 

Best regards,

Javier

Helpful resources

Announcements
thirdimage

Power Automate 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

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

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