I created a timespan with +1 as trigger time and +3 as end time.
When I use this timespan in a stored query as 'sched_start_date < EndAtTime(\'Next_3Days\')', I get error 'AHD05800:Bad where clause. invalid constraint. Check data types of referenced attributes'.
Any ideas what could be causing this?
Is this a typo ? Shoudn't it be sched_start_date < EndAtTime(\'Next_3Days\') ?
What is the error message in the stdlog say ?
Sorry, that was typo. Have edited it now.
This is the error in the stdlog.
timespan.c 314 Unable to locate timespan (Next_3Days) index; (0)
I double checked and the timespan with the mentioned name does exist.
Hi,
Please attach a screenshot of the timespan definition.
Regards,
James
have you tried to use code then?
sched_start_date < EndAtTime(\'TSPAN3DAY\')
Yes. Gives the same error.
oh, as a last hope, have you tried to rename timespan? maybe symbol have spaces or any other invisible chars?
This worked. Should have checked for the spaces. Completely missed it.
Thanks for pointing it out!
I got the same error message when I clicked <save>, but I retyped the Where Clause and copied & pasted Time Span Symbol from the created Time Span Detail screen, it was fixed. If Time Span Symbol name is not exactly same as the created one, the error will appear. As Timur mentioned, the Time Span symbol may contain space or invisible characters... you should try to recreate the Time Span.
Kind regards,
Kaori
CA SDM - CA Service Desk - AHD Codes - Error