pensive Posted June 10, 2005 Posted June 10, 2005 Remind me to wash all of your cars or something...for all the help you guys have given me. I have a field -- Visit Date I have a field -- Last Visit Date I would like Last Visit Date to automatically contain the field from 'Visit Date' in the last related record. more specifically, a patient has a visit. and we want to know when their previous visit was in a field. i would love to have this as just a calculation field rather than a script... is it possible? Thanks so much in advance.
aaa Posted June 10, 2005 Posted June 10, 2005 Create selfrelation such that Visit_Date<=Visit_Date and Patient=Patient Sort your relation(let his name is Patient_Last_Visits) by Visited_Date-descending then your Last_Vist=Clients_Visit::Visit_Date.
aaa Posted June 10, 2005 Posted June 10, 2005 If you can not do it. I will help you tomorrow. Be well.
-Queue- Posted June 10, 2005 Posted June 10, 2005 To clarify, the relationship should be Visits 2::Patient = Visits::Patient AND Visits 2::Visit_Date < Visits::Visit_Date You do not want to use <= or the current record's date will be included. You will probably be defining it in the opposite direction, and so will be using > instead of <. Also, if you sort the relationship as aaa suggests, then you do not need a Last Visit Date field; you can simply put the related Visit_Date field directly on the layout.
pensive Posted June 10, 2005 Author Posted June 10, 2005 Thank you guys very very much. i'm working on it as we speak...
Recommended Posts
This topic is 7174 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