Tammy Posted May 17, 2004 Posted May 17, 2004 Good Morning, I am new to this bulletin board and fairly new to FileMaker Pro. Here's my problem. I want to create a script to do the following: Read through my master database file looking for only open records. Then read through a diary file (which could contain many or no records). I want to list every master record that has 1) no diary records and 2) any master that has a diary record that does not have a date greater than today. I'm sure this is an easy question for most of you pros, but I am stumped. I've tried finding only the open records then looping through the related records without much luck. Can someone help? Thanks T
dbruggmann Posted May 17, 2004 Posted May 17, 2004 Attached you find a very rudimentary sample file. You would certainly have to refine it for your solution. Have a look at it and tell me, if I correctly interpreted your task. MasterDiary.zip
Tammy Posted May 18, 2004 Author Posted May 18, 2004 Detlev, Pretty slick. Thanks for your attachment. However, I am wanting to run this via a script where it processes all the master records (ie, I find all the master records that are "Open") then use that subset to read through the Diary records that correspond with the found set. Can't seem to grasp that. I have a found set, I read the first record in it then read the corresponding Diary record(s). Any suggestions there? Thanks Tammy
dbruggmann Posted May 18, 2004 Posted May 18, 2004 Tammy, I don't precisely understand what you want to achieve. My questions: 1)
Tammy Posted May 18, 2004 Author Posted May 18, 2004 Sorry I am being unclear. Here it is.... I have a Client database. This database has different statuses. "Open", "Closed", "Consult", etc. For every "Open" Client record, I need to have at least one Diary record. From your great example, I was able to figure out how to identify those "Open" records that do not have any Diary records. The real problem comes in where I need to find all the "Open" Client records and then find all the Diary records that are associated with that Client record. Then I need to parse through the Diary records looking to see if any of the diary records are greater than today. If there are NOT any > today, I want that "Open" Client record file number to show on a form. So I could have 100 records for a particular client. But if none of those 100 records are greater than today, it is an error I want to report. We are trying to make sure we don't drop the ball on a tickler system. Does this make sense? Thanks Tammy
dbruggmann Posted May 19, 2004 Posted May 19, 2004 Okay, here are the sample files again MasterDiary_v2.zip
dbruggmann Posted May 19, 2004 Posted May 19, 2004 Hello Tammy Just a caveat according to my sample: I used the "today function" for reason of simplicity. For a definitive solution, there should be an alternative way to determine the notes dates. This because the today function needs to be reevaluated every day to work properly
stanley Posted May 19, 2004 Posted May 19, 2004 You should use Status(CurrentDate) rather than Today. -Stanley
Recommended Posts
This topic is 7492 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 accountSign in
Already have an account? Sign in here.
Sign In Now