Create Universe Object that is equal to a number
I need to implement a universe object that is equal to a datetime related number (epoch time in this case).
We can get the epoch number in the SQL by using TIMESTAMPDIFF, but this results in an SQL query that performs a calculation for each record.
SELECT FROM WHERE (() >= bigint((TIMESTAMPDIFF(2 ,char( (current_timestamp - 1 Minutes ) - (TIMESTAMP('1970-01-01-00.00.00'))))))+ 86400) What I need to have is something like: SELECT FROM WHERE BETWEEN 222562413545 AND 12354786787444
The numbers above therefore to be calculated in Objects.
Is this possible? To create a Object with a constant value, or one that is variable according to changes in time?
Sounds very simple, and if BO cannot do it I would be very surprised (and very disappointed).
Didier MAZOUE replied
In fact you need to use your SQL expression in a universe predefined condition.
Than you just need to drag and drop this condition in the query panel filter pane.
If you want to have this condition to be automatically added in the query, you have to set this filter as mandatory (feature availablein XI 3.0) associated to a specific class (for instance a class where you need to use this SQL expression): the filter is automatically added whate ver the object you are using in the query coming from the selected class where the filter has been associated.
You can also use @Prompt expression for the 2 boudaries in order to have a more dynamic query.