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
yashag2255
Dual Super User II
Dual Super User II

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
Solution Specialist
Solution Specialist

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

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
yashag2255
Dual Super User II
Dual Super User II

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

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
Solution Specialist
Solution Specialist

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

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

Hi,

 

Many thanks! @yashag2255 It works perfectly 🙂

 

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

 

Best regards,

Javier

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Top Solution Authors
Top Kudoed Authors
Users online (3,697)