How does your production order link to the article and location tables?
In general, you can tell if any related records exist with the IsEmpty function:
IsEmpty ( RelatedTable::NeveryEmptyField )
will be true if there are no related records. An ID field used to define the relationship is often used in this function and for this purpose as it will never be an empty field in this situation.
And if the ID is a number (which is highly recommended) then the test can be simple Boolean of: If [ relatedtable::ID ] which will evaluate as true if there is a number in the ID field.
yes it works thank you!
What is the advantage of using a number as an ID?
I'm not quite sure why, but all my IDs are of the form Contact1/Project112 - is there any disadvantage of doing this? I've just thought this might slow things down as number = number might be a quicker relationship for Filemaker to work out...
Filemaker plays fast and loose with data types and this can get you into trouble if you aren't careful. I've found that auto-entered serial numbers are best entered into fields of type number. Put numbers into number fields, text into text fields and dates into date fields. FileMaker will allow you to enter "Apple" into a number field, but that doesn't make it a good idea. Likewise, you can enter 3/4/2011 into a text field and that is also a bad idea.
FileMaker follows certain rules for how values are ordered when you sort them or compare them. The data type specified in a field determines which set of rules are used.
As numbers entered into fields of type number, 3 < 13 is a true statement and sorting on this field in ascending order will place a 3 before the 13. If these are text fields, the same expression, which is now "3" < "13" , becomes false and a 13 will sort before 3 as you are now using alphabetic ordering instead of numeric.
As I have further posts regarding why relationships should be Number fields, which I feel is digressing from the original post - I have started a new thread to continue this discussion: Defining Effective/Fast Relationships so the current thread can continue to focus on the issues raised in the original post.