Generate Field Dependencies

There is an additional process that can be run to generate lists of field dependencies.

What is a dependency and how it is different from a reference?

A field has a reference to it if it's used by another field, a script step, or some other calculation somewhere that uses this field.

However a dependency is slightly different. The logic for a dependency is any field that if it was changed, would cause this field to update. For example, a plain text field has no dependecies. A calculated field that only references fields in the same table occurence has as it's dependencies, every field used in the calculation.

For calculation fields that reference related fields, the dependent fields are any field in the calculation, plus any of the fields used as join predicates in every step of the relationship from context to field.

For auto-enter calculation fields, the dependencies are just the fields in the calculation that are in the same table as the starting field.

For a lookup field, the dependencies are any fields used as join predicates in the left hand side of the relationship that the lookup comes from.

Why do you want know this?

You can use this to work out, based on either single field or a found set, which other fields in my system affect this starting point. For example, if a calculated price field is dependent on many other related fields, but you want to run a script whenever a price is going to change, you can work out which fields in other files need to be scripted so that your process will run accordingly.

There isn't anything else to do this kind of dependency tree in any other solution available for FileMaker developers. We think it's pretty nifty.

How do I use it?

Start with a found set of the fields you want to check dependencies for. The go to the dependencies tab on the portal at the top right, and click "Found Set" or "Current Field" as appropriate. BaseElements will create new windows with related data and search the dependency hierarchy as required. For each field that it finds, it sets a number in the "Tag Field" to mark the records found. Once it's complete, every record in the dependency tree will have the same tag data, and it will be on the found set of those records.

Syndicate content