The Original FileMaker Community
Business Templates - Demo Apps - Video Tutorials -Samples - Help - 46000 Member Forum

The Leading Filemaker Developer Tools

The FileMaker Relationship Graph – FileMaker Today


There are actually many other areas in FileMaker from which you can enter the relationship graph, and these areas are actually far more powerful a means of accessing the graph than Manage Database. It took me (Daniel) a couple of years of neglecting these access points to eventually realise that I should be using them all the time, and now I do!


Ever seen the option below when setting up a value list?


manage database


Or this when specifying a field on a layout?


manage database


Or even this when choosing a field in a calculation?


manage database


These are all links to the Manage Database dialog. Depending on the context from which you follow this link, you will either be taken to the last tab you were on when you last visited the Manage Database dialog, or directly to the relationships tab.


In all of the examples above the key context is the need to select a field, be it for the value list, the field on the layout, or in the calculation.


However FileMaker is very smart, and it knows that we entered the Manage Database dialog from this specific point. It knows that if we create a table occurrence when in the dialog, then there is a good chance we have created it because we need it in the original context.


FileMaker will automatically select the last created table occurrence for you when you leave the dialog, if entered from one of these special “Manage Database…” links.


As a classic example, let’s say we are creating a value list. The value list is to be based on a related field value from a given context. We have the initial context, but we have forgotten to establish a relationship to the related context. Rather than cancel out of all the dialogs to this point (and thus losing our work), we can instead go direct to the Manage Database dialog via the value list.


manage database


From here, we can add the relationship required for the value list


add the relationship


When we press OK, FileMaker knows we added the table occurrence, and so we likely wish to use it in the value list. It automatically selects the table occurrence for us so we can continue to build the value list.


table occurrence has been selected


If we are already in the Manage Database dialog, perhaps editing a field calculation, we can still use the “Manage…” shortcut, however in this situation it is a link to “Manage Relationships…” instead of “Manage Database…”.


manage relationships link


FileMaker prevents us from accessing more than 1 Manage Database dialog at a time, but it does let us access the relationship part of the dialog via a separate window.


manage relationships dialog


You’ll notice this window is purely for the relationship graph – there is no tab for tables or fields at the top. There is also no cancel or OK button, simply a close. This dialog works the same as the other access points. Upon pressing close, FileMaker will use the last created table occurrence back on the preceding dialog.


Relationship Graph Shortcuts




While not really obvious from looking in the relationship graph, there are in fact a number of really cool and useful shortcuts available. Refer to this link for a full list of shortcuts available. Below are some cool uses for these shortcuts.


Quick Selection of Table Occurrence Groups




If you use the anchor-buoy method of designing your graph then there may be times you need to select an entire table occurrence group. The simplest way is to start by selecting the anchor, and using the cmd+Y (ctrl+Y on windows) shortcut to progressively select table occurrences more and more levels away from the anchor. Just repeatedly tap the cmd+Y key a few times to quickly select the entire TOG. You could now use cmd+T to expand the entire TOG if you wish.


using cmd Y


Got a Big or Messy Graph?




Sometimes a common problem on large or messy graph is the inability to locate a particular table occurrence you want.


You can start by trying to type the name of the table occurrence if you know it and this can be all you need in some cases. If your table occurrence has a long name or contains spaces then it can be difficult to type the name fast enough to find it. If you found at least 1 result then you can use Cmd (ctrl) + G shortcut to cycle through the full list of found matches until you find the one you were after.


If that doesn’t work, try using the cmd (ctrl) + U shortcut. Start by selecting a table occurrence whose underlying table is the same as the one you want to find. Can’t find a table occurrence? Then just add one temporarily for this purpose. Select it and use cmd+U. Now zoom out of the graph and focus just on the highlighted table occurrences.


using cmd U


An application we often use here is 2empowerFM Developer Assistant which among other things is great for locating Table Occurrences on the graph.


Finally you can just print the graph. The Print button is located in the lower left corner of the relationship graph. When printing, you have the option to print the graph on a single page or multiple pages – either option is good.


printing the graph


Instead of printing it, generate a PDF instead using the Preview/Save as PDF option from the print dialog (and the windows equivalent).


PDF of the graph


Now you can search the graph using your PDF reader instead of FileMaker. This is actually not a bad idea for large graphs as FileMakers search tends to get significantly slower with an increased number of table occurrences, whereas the PDF readers tested perform fine.


The other benefit of using a PDF reader like Preview, is that it can be easier to quickly see and scroll through all found results.


Viewing results of search


Quickly Creating Relationships




When forming a relationship between two table occurrences, don’t waste time dragging the relationship line directly onto the field you want in the source and destination table occurrences – you’ll be there all day waiting for the fields to scroll!


The quickest way to add a relationship is to drag the relationship line from any field on the source side to any field on the destination side. Then use the edit Relationship dialog to correctly choose the fields required. Be sure to use the type-ahead functionality provided to quickly locate the fields. If you need to expand table occurrences in order to drag the relationship line, use the shortcut cmd (ctrl) + T to expand both table occurrences at the same time. You can then use it again afterwards to collapse them at the same time – every second counts !


Adding Relationships


Keep your Graph Tidy!




This is the number one thing you can do for your graph to boost productivity and decrease development time. A tidy graph is a happy graph. Try to avoid overlapping relationship lines and keep some kind of logical layout to your table occurrences.


Remember, the alignment tools are your friend, just as they are when working in layout mode. They work very much the same way – with the exception of there being no shortcut keys (Shame on you FileMaker!).


Alignment Tools and Custom Menus




A bug that presented itself in FileMaker 10 and has persisted until this day concerns the alignment tools in the relationship graph. If you entered the graph from a layout that is in browse mode, and are using a custom menu, then the alignment tools are going to be greyed out and unavailable. You should ensure that you are in layout mode first, or switch your custom menu. Here’s hoping FileMaker will fix this in future!


Alignment Bug


Comment Boxes




Comment boxes need not just be used for comments. We also use them as dividers that separate table occurrence groups, or logical sections of the graph. Particularly useful in anchor-buoy systems is adding a large comment above the TOG to indicate its purpose, or the screen it pertains to. This makes locating TOGs on the graph much easier. For large graphs, make the text size big so you can still find TOGs when zoomed out.


using Comments


If you prefix your TOG labels with something standard – such as “zzz” – then searching for a particular TOG becomes a cinch. Use the graphs search functionality – it looks for comments as well as table occurrences!


prefixing comments


Creating Table Occurrences




Much like creating objects in layout mode, there are a few ways to create table occurrences on the graph. Firstly, you could use the provided button to add a table occurrence from scratch. A duplicate button is also provided – select a table occurrence and then use the button to duplicate.


table occurrence options


Our favorite method however is option (ctrl) + Drag to create table occurrences. When using the option+drag method, the edit table occurrences dialog does not appear automatically after the duplicate is created. This is really handy, because often you want to position the table occurrence first.


duplicate table occurrence


And Finally, Table Occurrence Names




Using a naming convention is a great way to assign names to your table occurrences to keep everything in order, and make it easy to identify a table occurrences purpose, and its associations. There are many different conventions out there and everyone has their favorite.


Often naming conventions are such that in order to add a new table occurrence it is easiest to create a duplicate of the table occurrence it will be related to. You can then change its underlying table and rename it by changing a few parts of the table occurrence name.


duplicate table occurrence

Above I have created a duplicate of a table occurrence that I wish to establish a new relationship from.changing underlying table


If I go directly into the table occurrence setup and change the underlying table, you’ll notice that the table occurrence name has reverted back to the table name. This happens upon entering the dialog and making no changes to the occurrence name. Once you make any change to the table occurrence name, it will remain as-is when you change the table.


So the tip here is, change your table occurrence name first before changing the table. Another good habit of getting into is copying the occurrence name to clipboard when entering this dialog. Tab followed by cmd (ctrl) + C will put it on the clipboard. Then if you change the table it doesn’t matter if it gets overwritten as you can paste it back in.


keeping the table occurrence name


Every second counts so if you can reuse any existing table occurrence name then it is worth doing.

This website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt-out if you wish. Accept Read More