Jump to content
Sign in to follow this  
craiglcmcdonald

Self Join help

Recommended Posts

Hi there

Am creating a database of children's heights. Have a main table with each child's name and age - call it CHILDREN

Each time I see the child I measure their height and weight which are entered into a new table call it GROWTH

What i need is when I measure the height on this occasion I want the date of the last measured height ON THIS CHILD to be automatically entered into the record for this occasion.

I think I need a self join relationship but am not sure how to set it up so that the height is automatically entered.

All help appreciated.

Craig McDonald

Share this post


Link to post
Share on other sites

Set up a self-join, by creating a new TO for the Growth table (like Growth_selfPrevious), and connect it to another TO of Growth via childID_kf = childID_kf and dateMeasurement > dateMeasurement; sort the records from the new TO by date, descending. This means that the first record via that relationship is the last measurement before the current one.

Then set up an auto-enter calculation for the height field, with Growth_selfPrevious::height as the result. Make sure you use the other Growth TO as the context for the evaluation.

Share this post


Link to post
Share on other sites

I'm sure I will be able to figure out what that means. Sorry am very new to Filemaker and struggling with the jargon a bit.

Many thnaks for your prompt reply. Will go and play.

God Bless

Craig

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...

Important Information

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