Nested Repeating Group - Newest Record

Hi all

Hopefully this is a dumb question with an easy answer.

I have a repeating group RG1 with a nested repeating group RG2 whic retrieves records with a one to many relationship between 2 data types. In RG2 I only want to show the last record created. At the moment I am retrieving all records into RG2 and I don’t seem to be able to find a way ojust displaying the last one created.

Any advice please?

why you use RG when you want to show only one record (last record)?
you may use the basic group and search for the records and use :last item

Of course…thank you.

I have a similar problem Id like to solve. Im using this thread instead of creating a new one because I think it`ll be more organized. Please advise if I rather create a new one.

I have a couple of table I need to consolidate.

“extrato_iot” : brings the daily reading of a list of IoT devices. It brings date/time it was recorded (another field for the month), the device ID and the reading itself (among several other information).

I need to create a RG with these device IDs and its last reading recorded each month.


  1. DeviceID
  2. Date/time when the reading was recorded
  3. Month (it’s date #2 converted to d=01, h=01, m=01, s=01 so I’ll readings refer to 01/month - 01:00:00)

Highlighted in yellow you can see the same device recording Feb, 4 and Feb, 5 and if we gol further down We’ll find recordings almost every day. I need a RG with the latest record from mes_ref = Feb, 2024 and the last from Jan, 2024 and so on…

Could anyone help me out on this?

Thank you very much!