(names of it, last login times of it, number of issued actions of it, (number of issued actions whose (time issued of it > (now - (30 * day))) of it)) of bes users
I’ve tried this and several other variations i’ve found while searching the forums but I keep coming up short. Any suggestions? thanks -Baraq
<table border=1> <th>Operator</th><th>Last login</th><th>Total Actions</th><th>Actions Past 30 Days</th> <?Relevance trs of ( td of names of it & td of last login times of it & td of number of issued actions of it & td of (number of issued actions whose (time issued of it > (now - (30 * day))) of it) ) of bes users whose (name of it contains
"-co") ?> </table>
You are very very close. TD operates on a string object, but some of the values are integer and time, so we need to cast them into strings first.
<table border=1> <th>Operator</th><th>Last login</th><th>Total Actions</th><th>Actions Past 30 Days</th> <?Relevance trs of ( td of names of it & td of (last login times of it as string) & td of (number of issued actions of it as string) & td of ((number of issued actions whose (time issued of it > (now - (30 * day))) of it) as string) ) of bes users whose (name of it contains
"-co") ?> </table>
Sometimes the default time format can be a little hard to read and sort. So here is one for reference.
<table border=1> <th>Operator</th><th>Last login</th><th>Total Actions</th><th>Actions Past 30 Days</th> <?Relevance trs of ( td of names of it & td of ( (year of it as string &
"/" & month of it as two digits &
"/" & day_of_month of it as two digits) of date(local time zone) of it &
" "& (two digit hour of it as string &
":" & two digit minute of it as string &
":" & two digit second of it as string) of time (local time zone) of it) of (last login times of it) & td of (number of issued actions of it as string) & td of ((number of issued actions whose (time issued of it > (now - (30 * day))) of it) as string) ) of bes users whose (name of it contains
"-co") ?> </table>
Which means means i’m querying something that doesn’t exist? but I’m able to run this as a string ok in the pres debug.
edit:
hmm. looks like login times clause is what’s stopping me up now.
td of ( (year of it as string &
"/" & month of it as two digits &
"/" & day_of_month of it as two digits) of date(local time zone) of it &
" "& (two digit hour of it as string &
":" & two digit minute of it as string &
":" & two digit second of it as string) of time (local time zone) of it) of (last login times of it) &
This error happens when you try to query a property of something that doesn’t exist. My guess is that you have operators who’ve never logged on, so they do not have a “last login time”.
Give this expression a shot:
trs of ( td of names of it & td of (
if ( exists last login times of it ) then ( ( year of it as string &
"/" & month of it as two digits &
"/" & day_of_month of it as two digits ) of date ( local time zone ) of it &
" "& ( two digit hour of it as string &
":" & two digit minute of it as string &
":" & two digit second of it as string ) of time ( local time zone ) of it ) of ( last login times of it )
else
"Never" ) & td of ( number of issued actions of it as string ) & td of ( ( number of issued actions whose ( time issued of it > ( now - ( 30 * day ) ) ) of it ) as string ) ) of bes users whose ( name of it contains
"" )