AnsweredAssumed Answered

How do I display the info from the next table record?

Question asked by thenewcomer on Oct 29, 2018
Latest reply on Oct 29, 2018 by weetbicks

Hi everyone,

I have two tables, one called MedicalExams and the other MedicalBilling. Each time an exam is performed, a bill is created that shows amongst other things the cost of the exam and the reason for the billing; as the MedicalBilling table also contains billing for procedures other than a medical exam, the bill has a field that indicates, in the case of an exam, the reason for the billing as being ‘’medical exam’’. In a layout based on the table MedicalBilling (MedicalBilling::Id x MedicalBilling::Id), the list of all billings for ‘’medical exam’’ is supposed to be displayed in a portal. I’m testing the solution now and I’m realizing that as soon as there is more than one bill for ‘’medical exam’’ in the DB, the cost of the exam being displayed in the portal for the second bill is the one for the first bill, and the same goes for the third bill, etc. How can I ensure the portal displays the  amount that corresponds to the record being displayed?  I’ve tried the following but it is not working:

Let ( R = Get ( FoundCount ) ; If ( R > 1 ; GetNthRecord ( ExamCost ; R - 1 )))


I hope these explanations are clear enough so that someone can help. Thank you.