I'm up and running with FileMaker Pro 12! Playing around with portal filtering, I discovered an odd little nuance that can be quite important.
I have a "Menu" table/layout and three portals to three tables: Process, Task, and Project. The Menu table includes two global variables, Selected Process # and Selected Task #; Task has a Process # that indicates which process the task belongs to, and Project has a Task # that indicates which task it belongs to. The portals appear like this:
Process 1 --------------------------------- Task 1 ------------------------- Project 1
Process 2 etc.
...
The idea is that if you click on Process 1, the Task portal will only show those tasks essential to Process 1. (So if the Process is "Walk the Dog," the Tasks will include "Get leash" but not "Cast vote".) Once you select a Task (say, "Put leash on dog"), the Project portal will show only the relevant projects (e.g. in this case we only want dogs, so we'd see "Fido" and "Spot" but not "Dumbo").
Clicking on a Process sets the Selected Process # to the process's number, and likewise clicking a Task sets the Selected Task # to that task's number. The portal filters use these to determine which Tasks and Projects to show, by matching them against the relevant fields in the Task and Project tables. So far so good.
But things began behaving bizarrely. Although the Process and Task portals worked and updated properly, the Project portal—which should only be dependent on the Task #—would only update after I clicked the Process portal.
After much agonizing, I discovered the culprit. My table relationships looked like this:
Menu::Selected Process # ---------- X ----------- Process:: ID #
Menu::Selected Process # ---------- X ----------- Task:: ID #
Menu::Selected Process # ---------- X ----------- Project::ID #
All of the relationships were tied to Menu::Selected Process #. Lulled into a false sense of security by portal filter, I figured that since I was using 'X' joins it didn't matter which field served as the link between the tables. WRONG!
Once I changed the last relationship to
Menu::Selected Task # ---------- X ----------- Project::ID #
everything worked fine. Boo-yah!
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment