Newbies JPMaker Posted February 20, 2015 Newbies Posted February 20, 2015 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.
comment Posted February 20, 2015 Posted February 20, 2015 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). 1
Newbies JPMaker Posted February 20, 2015 Author Newbies Posted February 20, 2015 I am trying to duplicate this in my solution but I can't get it working properly. I've been working on this for days LOL. I have attached my filemaker file perhaps you can see the folly in my programming. Charter CRM Copy 1.fmp12.zip
comment Posted February 20, 2015 Posted February 20, 2015 I am afraid I am still in v.11, so cannot open your file. Which of the variants are you trying to implement?
Newbies JPMaker Posted February 20, 2015 Author Newbies Posted February 20, 2015 I am able to get the value lists working, however, when I add a second record to the FlightLegs Portal it shows no Data.
Newbies JPMaker Posted February 20, 2015 Author Newbies Posted February 20, 2015 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)TerminalDepartFlights --< 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.
bruceR Posted February 20, 2015 Posted February 20, 2015 Here are some screenshots, etc. from the fmp12 file. FlightFields.pdf
Newbies JPMaker Posted February 21, 2015 Author Newbies Posted February 21, 2015 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.
Recommended Posts
This topic is 3624 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 accountSign in
Already have an account? Sign in here.
Sign In Now