UCMDB and UD Practitioners Forum (Previously CMS)
Showing results for 
Search instead for 
Do you mean 

Use fixed values in Query Node Properties attribute values, e.g. NOW

Frequent Advisor

Use fixed values in Query Node Properties attribute values, e.g. NOW

Hello,

 

UCMDB 10.10

 

Trying to create a report.

I defined a query.

One of the CI types contains a date attribute.

I can edit the 'Query Node Properties' and select the date attribute.

The operator is 'Less than or equal'.

In the 'Value' i want to have 'Now' as fixed value. So if i run it today it has today's date and if i run it tomorrow it has tomorrow's date.

I tried Now, =now, "=now", but every time it ends up with the date and time of the moment i entered it.

But expecting to have something like "=now" which translates to a date and time at the moment it runs.

 

Regards, Marcel

Regards,
Marcel Rijsbergen
2 REPLIES
Trusted Contributor

Re: Use fixed values in Query Node Properties attribute values, e.g. NOW

Hi,

 

I don't think that this is supported, because you are trying to show a value in report which is not stored for that attribute in CMDB. In the "Node Properties" you can query the CMDB based on value of a attribute but you can't store a value using this option.

 

Instead you can export the report in the PDF format as it contains the timestamp when the report was generated.

Regards
Puneet

If you find this reply helpful, Click the KUDOS button on the bottom to say 'Thanks'
Frequent Advisor

Re: Use fixed values in Query Node Properties attribute values, e.g. NOW

Hello Puneet,
 
>> I don't think that this is supported, because you are trying to show a value in report which is not stored for that attribute in CMDB. In the "Node Properties" you can query the CMDB based on value of a attribute but you can't store a value using this option.
 
A:
- In the question i was using 'a' CI because i was hoping that there was a general way. Appears there is none.
- More specific, for the CI type 'Digital Certificate' there is a attribute 'ValidTo'. So the date value is there to compare against.

 

>> Instead you can export the report in the PDF format as it contains the timestamp when the report was generated.

 
A:
- Yes, but that is no good is i want to run it tomorro again. Because at the moment you enter now or =now in the value field the date/time of that moment is saved. So if i run the report tomorrow (scheduled) it still has the date/time of the moment i saved the query.
 
Regards, Marcel
Regards,
Marcel Rijsbergen
//Add this to "OnDomLoad" event