CMDBuild Forum

History Report

Hello,

 

Is it possible to create a report using all historical data in a set time period and email that as a batch notification?

 

Thanks,

Devin

Yes it is possible.

You need to write a sql query that joins the base data tables and the historical data tables ("_history").
CMDBuild Team
Thank you for your response!  Digging into both of those tables in phppgadmin now.
 
Looking at the two tables... 
 
Does Joining on ID let me compare the two entries?
 
Also, what does the Current ID in the historical data table refer to?  I thought there would be a corresponding field in the base data table but I don't see it.
 
Also is there a function that compares the most recent changes (one prior to the historical entry).  Some inter-table diff perhaps?
 
Thanks,
Devin
 
Previously Tecnoteca wrote:

Yes it is possible.

You need to write a sql query that joins the base data tables and the historical data tables ("_history").
CMDBuild Team

 

Each row in the base table and each row in the historical table has its own Id.
The CurrentID allows you instead of linking an historical row to the corresponding currently valid row in the base table.

 

CMDBuild Team

 

 

Excellent.  This will allow me to compare the previous value with the editted value.
 
Any way to also retrieve rows when new objects were added?  I'm not seeing any new entries when I join on currentId.
 
Thanks,
Devin
 
Previously Tecnoteca wrote:
Each row in the base table and each row in the historical table has its own Id.
The CurrentID allows you instead of linking an historical row to the corresponding currently valid row in the base table.

 

CMDBuild Team

 

 

 

Slightly resurrecting an old thread.
 
What would you perform the join on between both tables?
 
Thanks,
Devin
 
Previously Tecnoteca wrote:

Yes it is possible.

You need to write a sql query that joins the base data tables and the historical data tables ("_history").
CMDBuild Team

 

You can use the "CurrentID" column.

CMDBuild Team