AnsweredAssumed Answered

Temporary "ad-hoc" relationships

Question asked by MikeTV on Feb 1, 2009
Latest reply on Feb 2, 2009 by TSGal

Title

Temporary "ad-hoc" relationships

Post

Hi TSGal

 

A question about relationships.

 

As mentioned in an earlier post, I am an experienced DataEase (DOS) developer, but new to Filemaker.

 

In DataEase, there are two possible types of relationship:

  • "Normal" where there is a permanent relationship established beween two tables
  • "Ad-hoc" where a temporary relationship is established as a step within a script
     
  • The first "Normal" type is essentially the same as those established in the Filemaker Relationship graph. They can be used in much the same way, either within forms & tables (for lookups and portals etc), or within scripts for any relevant purpose.

     

    However there are some differences, in that Filemaker allows some greater control in terms of how the tables are matched (unequal, greater than, smaller than, etc) and also allows the developer to hide relationshipships from the user, so preventing "drill-downs" when this is undesirable. By contrast, Dataease "normal" relationships are inherently bi-directional and are always visible to the user (although control can be exerted by security settings, and by controlling how one table is updated via the other).

     

    The second "Ad-Hoc" type exist only within scripts, where they are "declared" as a script step in much the same way as a temporary variable would be declared. From the users point of view, this type of relationship only functions while the script is running, and is otherwise unavailable.

     

    There are three main reasons why a DataEase developer might use the "Ad-hoc" type:

    • Where the pathway created beween the two related tables should not be readily accessible to the users, so the secondary table is effectively "hidden"
    • Where a more complex relationship can be created than is possible with the "Permanent" relationship type (largely replicating Filemaker's richer matching possibilities, but can go a beyond this)
    • To avoid the possible performance hit of excessive numbers of permanently established relationships in complex & large applications.
       
    • It seems that with Filemaker, the first two scenarios are pretty much covered by Filemaker's inherent functionality. However, the last one concerns me somewhat.

       

      With DataEase, best practice would be to keep the number of permanent relationships to a bare minimum, using ad-hocs with scripts to supplement when needed. 

       

      I appreciate that Filemaker is very different from DataEase under the skin, so having a large number of permanent relationships between heavily populated tables may not have the same overhead as it might in DataEase, but the point still concerns me.

       

      Does Filemaker have any means of establishing temporary relationships within scripts?

       

      Many thanks for your help.

       

Outcomes