How do I get second to last payment with student ID using calculations
You can get a field's value from the previous record in the current found set using
GetNthRecord ( Table::field ; Get ( RecordNumber ) - 1 )
where said current found set is by its very definition a temporary thing. So if that is what you actually need ... hard to tell.
It would help to know the design and orgainization of your tables and data to better define what you mean by "previous".
A relationship based on an auto-entered serial number or a creation timestamp could be used, possibly in conjuction with other fields such as a studentID to always match to the record created for the same student immediately previous to the record in question by using a self join relationship:
Students::_fkStudentID = StudentsPrevious::_fkStudentID AND
Students::CreationTS > StudentsPrevious::CreationTS
StudentsPrevious would be a second occurrence of Students.
Thank you very much for your response. Let me describe it below:
Please, find attached image.
What I actually want is that the immediate past appointment date should
always pop up on the latest record of the same patient. This will solve the
entire problem of this software i'm building.
The records shown in the picture belongs to one patient, meaning each
patient can have multiple records.
Thank you so much.
What you have posted can be handled by my suggested solution, though you'll need to change the names.
Please Sir, I have tried it, did't work. Could you please help me add the
filed name Sir.
"it didn't work" doesn't give me enough information to use to help you.
What exactly did you set up?
Exactly how did it fail?
Retrieving data ...