Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×
The Claris Museum: The Vault of FileMaker Antiquities at Claris Engage 2025! ×

This topic is 4703 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

Hi,

For a specific function, I need to fetch a specific field from a related table.

An assignment can have multiple external file numbers.

assignments (_pk_assignment_id, ...)

externalFileNumbers (_pk_fileNumber_id, _fk_assignment_id, type, fileNumber, ...)

I need to get the value of the fileNumber where the type = "NAS".

The SQL equivalent would be.

SELECT externalFileNumbers.fileNumber

FROM externalFileNumbers

INNER JOIN assignments ON externalFileNumbers._fk_assignment_id = assignments._pk_assignment_id

WHERE externalFileNumbers.type = "NAS";

This is not for display, so no portal filtering...

Thanks for any help

Posted

If you need it in a calculation, then you will probably need to create a relationship matching by:

externalFileNumbers._fk_assignment_id = assignments._pk_assignment_i

and

externalFileNumbers.type = assignments.constant_NAS

Where assignments.constant_NAS is a global field that is either calculated to equal "NAS", or is set by a script step to equal "NAS" before evaluating your calculation. If you need to access types other than "NAS", then you'd want the 2nd option, so you can set it's value to match a different type when needed.

Posted

It is not possible to enter 2 fileNumbers of the same type. This condition is validated when the data is entered.

If this would be the case, then the first number is picked.

This topic is 4703 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.