How to show only the most recent Records?

I have a database with information about some People, and the information is imported from an external website. I need to display only the most recent information, how can I do that?

Thanks.

Hi, you can create a sorting by attribute "dtImportacao" Desc



Regards,

Leonardo Nascimento wrote:

Hi, you can create a sorting by attribute "dtImportacao" Desc



Regards,


But with the sorting the Old Data will be shown aswell.

Israel ... wrote:

I have a database with information about some People, and the information is imported from an external website. I need to display only the most recent information, how can I do that?

Thanks.

You can do this steps:


Step 1:


Step 2:


Israel ... wrote:

Leonardo Nascimento wrote:

Hi, you can create a sorting by attribute "dtImportacao" Desc



Regards,


But with the sorting the Old Data will be shown aswell.


Ok, mark the aggregate property "Max record" to 1

And will display only one record.


Regards,

HI Israel,

How much is the recent you wish? 1 day, 2 days, a week?

You can use a filter like DiffDays(dtimportacao, CurrDate()) < 10 to bring until 10 days, for example.

Hi, 

Besides the solution given by Leandro, that is how we do when we want to show a few days of data, you can take a different approach. 

For example, you can mark if the record was already viewed or not. In this case, each user that can see the data will need an entry in an entity where you store the last Id your user saw. When fetching data, you fter the records based on this id stored (entity.id > stored.id). And than you updates this value with the latest id. 

Just an idea. 

Cheers 

Hi Israel ... ,


I think the solution is provided by Eduardo Jauch is nice, because different user have view different items so on the basis of single entity can not show most recent records.


Thanks guys, on monday i'll try your answers. Unfortunately I can't access the server with this application in my home.

Solution

Hey guys, the best solution for me was creating a combo box where I can choose the source of the data by the date of import.

Thanks for your tips.

Solution

(Y)