How to get the last record of a list of items in the database

Can someone help me with a question … I have a Risk Analysis table with 36 items with different information. Each time I update data from these 36 items, a new repeated item is created. For example, if I update the risk value of item 23, a new item 23 is created with the updated data. My question is how to present only the 36 items with the updated data in the Repeating Group, and I need this to generate an updated graph with the latest information for the 36 items.

A new duplicated item is created in your database? Is that intentional?

Or is showing in the Repeating Group?

Without knowing more it’s impossible to answer the question, and it’s not clear from your post if you’re asking why a duplicate entry is being created, or it you’re doing that intentionally and need to delete the duplicate entry?

Or do you want to keep all duplicate entries in the DB and only show the most recent in the repeating group?

2 Likes

As @adamhholmes said, a bit more info is needed.

However, one idea might be to have a “current” yes/no field. Then have a workflow so when a new item is created, it is set to current=yes, and finds the old matching one, and changes it to current=no. Then the repeating group constraint can be filtered to current=yes

2 Likes

Hi [
adamhholmes, thanks for you attencion!

Exactly, I want to keep duplicate entries in the DB because I need to generate an evolution report by period and show the RP only the most recent entry for each item.

Thanks

Hi Robert,

Your suggestion is the best I’ve had so far. I need to keep duplicate entries due to update history and reporting by period. I appreciate your great contribution.

Marcio

1 Like