Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
VictorBoscaro
Contributor II
Contributor II

Get last status of a object

I need to create a table in the last page of my app that shows some informations about documents.  One of the columns that I need do add is the situation of that document. For that I want to bring the last situation of each document (I have a date column for each os the status).

How can I do it?

1 Reply
QFabian
Specialist III
Specialist III

Hi @VictorBoscaro , i made this possible scneario, hope it works for you, because your tables structure may be different :

 

//Scenario 1 :
Data:
Load
[Document Number],
[More Fields...],
Situation,
[Situation Date]
From [yourlib and datasource];

Data_Last_Situation:
Load
[Document Number],
max([Situation Date]) as Max_Date
Resident Data
Group By
[Document Number];

Left Join
Load
[Document Number],
[Situation Date] as Max_Date,
Situation as Last_Situation
Resident Data;

QFabian