FileMaker: GetNthRecord related field of a related row in a portal

Hi Experts,

So I'm having a little issue retrieving the value of a related field of a related row in a portal.

I have 3 tables with the following relationships:

person_id, name, address_id

address_id, address, state_id

state_id, state_name

I have a layout based on the people table with a portal based on the addresses table that shows all addresses for one person.

I'm trying to get state_name of the nth portal row in one of my scripts:

GetNthRecord ( states::state_name; $rownum )

but it doesn't work. I'm getting nothing. If I do:

GetNthRecord ( addresses::address; $rownum )

it works.

Any suggestions?

Who is Participating?
Peter HarrisConnect With a Mentor FileMaker Developer at CognitiveCommented:
One option:
In Addresses table create a calculated field (say called c_state_name) that holds states::state_name (based on a relationship between Addresses and States by state_id.

Make sure this is working, then you can use:
GetNthRecord ( addresses::c_state_name; $rownum )
rmartesAuthor Commented:
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.