Salin Posted February 21, 2008 Posted February 21, 2008 Hi, I have an ApptTable with number of fields, such as PtName, PtDOB, ApptDate and etc. How can I find the last appointment date that is > 1/1/2008, and each person is 50 and older in the ApptTable? Appreciate for any help. Salina
mr_vodka Posted February 21, 2008 Posted February 21, 2008 If you are talking about the last appointment date for each patient, then you will need to have either a self join relationship based on patient ID or if the database is in a proper format where the patients are in a seperate table, then you can just create the calc there. Either or, the calc that has the lastest appointment would be Max ( SelfJoin::ApptDate ) or (PatienttoAppointmentTable::ApptDate) whichever setup you have... Then the find would be >50 for the age >1/1/2008 for the new calc
Salin Posted February 22, 2008 Author Posted February 22, 2008 Thanks John for your help. Max function should work in my case as I have a main table and an appt table. However, I only know how to use Set Field and Perform Find to find a set of data. Set Field doesn't seem to let me put in the max function. I did some readings in FileMaker scripting and tried different ways in my script. There is still no luck to get my script to perform. I guess I need some more handheld help. Would you mind and give me an example of a simple script with the max function? Thank you very much! Salina
Fenton Posted February 22, 2008 Posted February 22, 2008 Are you trying to use the Max() function while you're in Find mode? Because it won't work then, no calculation that depends on data will, as the only data available in Find are globals, or variables. With FileMaker 8.5 you can use the latter. Set your Max() value into a script Variable, using the Set Variable step. Then use that to Set Field during the Find.
Recommended Posts
This topic is 6118 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