February 20, 201510 yr 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.
February 20, 201510 yr 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).
February 20, 201510 yr Author Newbies 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
February 20, 201510 yr I am afraid I am still in v.11, so cannot open your file. Which of the variants are you trying to implement?
February 20, 201510 yr Author Newbies I am able to get the value lists working, however, when I add a second record to the FlightLegs Portal it shows no Data.
February 20, 201510 yr Author 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)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.
February 21, 201510 yr Author 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.
Create an account or sign in to comment