If your reading records have a date or timestamp, GTRR for a specific house to a layout with readings, date/timestamp-sort readings, go to last record (if the new reading record has not been created yet), fetch "previous" data, create new reading record, copy previous reading. Go back to original layout.
Have you tried "GetNthRecord"?
Thank you Torsten,
I suppose I can also sort based on the ID.
So you say:
- Go to Readings-Layout showing only related records
- Sort on ID, increasing
- Go to last record
- Fetch data (set variable)
- Make new record
- Set fields.
Great! Sounds good.
...later: Yep! it works. Thanks! Regards, Thomas.
I'd be careful with sorting with large data sets. Sorting in my experience is slow.
And, AFAIK, FileMaker doesn't retain sorted order, say in a ".idx" file or something like that (custom indexes) so it sorts each time. (Somebody ... please correct me if I'm wrong about that.)
I would try to use Find whenever possible, which is super fast, and it DOES use the index necessary.