Select Specific RecordsUpload ImagesLink Warren Lovegrove 12 months ago
Hi Richard, I have a group of properties that require annual OPEX reconciliations based on lease anniversary dates. I've setup a table to store all OPEX relating to each property. I've also stored the start dates for the period these OPEX cover. The "Period Dates" do not coincide with the anniversary dates, hence I'm needing to calculate a proportion of costs between these dates. I/m in the middle of setting up code to run this reconciliation, however I'm struggling to find a good way to select the relevant records based on the anniversary dates. I can filter using type of OPEX, propertyID, and records prior to anniversary date, however with multiple records meeting this criteria, I need to refine further. I'm looking to select the first record (in some cases there may be 2/3 records with some date I need to select) for each OPEX prior to that anniversary date. Once I have that I can loop through relevant records to complete reconciliation. Can you suggest the best way to go about this? Thanks