Jump to content

Filtered value list problem


JPMaker

This topic is 3345 days old. Please don't post here. Open a new topic instead.

Recommended Posts

  • Newbies

I've been racking my brain trying to figure out how to filter my value list.  Here's what I have

 

Tables:

Flights

Airports

FlightLegs (A join table for flights and airports)

Terminals (there are many terminals at each airport)

 

On my flights layout I have a portal so that I can add however many flight legs as I need for each flight.  I've created two TableOccurances of airports "AirportsDepart" and "AirportsArrive" so that I can have a departure airport and an arrival airport for each leg.   Once the user selects the airports I want the list of terminals show only the terminals at each respective airport.  

 

My relationship setup:

                                       >(TO)AirportsDepart

                                   /

                                 /------->(TO)TerminalDepart

Flights--->FlightLegs

                                 ------->(TO)TerminalArrive

                                                              

                                     >(TO)AirportsArrive

 

I have  _fk(TO)TerminalDepart  and  _fk(TO)TerminalArrive in my FlightLegs table.  I can not figure out how to narrow the value list to show only the values of the TOAirportsDepart and TOAirportsArrive that the user selected.  

 

 

Link to comment
Share on other sites

You will need to add two more TOs of the Terminals table to your graph:

                           |-- (TO)AirportsDepart --< (TO)TerminalsDepart
                           |-- (TO)TerminalDepart
Flights --< FlightLegs >-- |
                           |-- (TO)TerminalArrive
                           |-- (TO)AirportsArrive --< (TO)TerminalsArrive

Then you can define the value list for selecting the terminal of departure to use values from the (TO)TerminalsDepart table, show only related values, starting from FlightLegs - and a similar setup for the other one.

 

 

 

Note:

 

Strictly speaking, these two relationships are redundant:

                           |-- (TO)AirportsDepart 
                           |
Flights --< FlightLegs >-- |
                           |
                           |-- (TO)AirportsArrive

After all, once you have selected the terminal, the airport is given by that. So if you wanted, you could use a single relationship, based on a global field, to narrow down the choices of terminals for both departure and arrival. IOW, you would have something like::

                           |-- (TO)TerminalDepart >-- (TO)AirportDepart
                           |
Flights --< FlightLegs >-- |-- (TO)GlobalAirport --< (TO)GlobalTerminals
                           |
                           |-- (TO)TerminalArrive >-- (TO)AirportArrive

However, this requires some attention to detail when building the layout, because users may find it confusing to see their selection of the airport of departure change when they select the airport of arrival. This could be handled by covering the global fields (there would be two instances of this field on the layout) with the name of the selected airport, taken from the related TO (related via the selected terminal).

  • Like 1
Link to comment
Share on other sites

  • Newbies

I'm sorry, I'm trying to implement your first Variant

 

 

 

You will need to add two more TOs of the Terminals table to your graph:

|-- (TO)AirportsDepart --< (TO)TerminalsDepart
                          |-- (TO)TerminalDepart
Flights --< FlightLegs >-- |
                          |-- (TO)TerminalArrive
                          |-- (TO)AirportsArrive --< (TO)TerminalsArrive

Then you can define the value list for selecting the terminal of departure to use values from the (TO)TerminalsDepart table, show only related values, starting from FlightLegs - and a similar setup for the other one.

Link to comment
Share on other sites

  • Newbies

I've got it working!   I finally located the problem.  I had another table called EmptyLegs that I was mistakingly using to narrow the results with INSTEAD of FlightLegs in the "Include on related values starting from" selector.  

 

Thank you VERY MUCH for you help with this.  This has been a great lesson in working with more complex relationships.  

Link to comment
Share on other sites

This topic is 3345 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.