AnsweredAssumed Answered

Adding an AND clause in the Relationship Manager

Question asked by Razor on Nov 10, 2015
Latest reply on Nov 12, 2015 by Razor

Hello, a quick introduction, I previously worked with MS Access for years and new to FileMaker.  In the past I set most of my properties through VBA.  I'm, having a problem grasping the concept of adding an “and” clause with the relationship viewer.

 

Lets say I have two tables, PartMaster and PackageInstruction.  I want to return a list of “current” packaging instructions to a portal.  I say “current” because rather than literally deleting or changing a record, I place a timestamp in a DELETE column to hide a record that no longer applies.  We sometimes revert a process and rather than recreating records I can go in and just simply remove the timestamp to make the record “active” again.

 

My SQL statements in Access generally looked like this;

 

SELECT PackageStep, SortOrder FROM tblPackageInstruction WHERE PartMasterID = fPartMasterID AND LEN(DeleteTimestamp) = 0 ORDERBY SortOrder

 

I have the equivalent of this working;

 

SELECT PackageStep FROM tblPackageInstruction WHERE PartMasterID = fPartMasterID

 

but can’t figure out the;

 

AND LEN(DeleteTimestamp) = 0 ORDERBY SortOrder

 

How do I do this with a relationship?  Or is there a better way of attacking this problem through scripting (which I would prefer).

 

Thanks!

Outcomes