No dont just type Luis
type clockIn(‘Luis’) and press Test
LOL please copy this exactly and put it in there.
clockIn(‘Luis’)
We are playing internet tag lol
I’m sorry I just caught that
You need to edit the SQL part. The variable needs to be = “+name+” NOT =“name”
So first you need to get it to return a value. THen try it in the field.
It could be Substring I am not sure.
You cant spread a sting over lines like that as you realised.
Also from memory I dont think you can just return the value of an swl exc, like that as think its always an object or similar.
I had first on all mine I think even queries returning only one row.
change r = sql.Query(qry)
to r = sql.Query(qry).First;
You can also have a multiline query but you must concatenate fully terminated strings:
var q = "SELECT * FROM SomeTable " +
"WHERE X = Y " +
"AND A > B " +
"ORDER BY Z";
Having the ‘name’ variable doesn’t work.
But when I hardcode in ‘Luis’, it works…
What am I doing wrong
You need to have ’ ’ within the code before and after the var name.
so that row should be
“and e.[Name] = '” + name + "’ " +
(the
‘" and "’
before/after name is hard to tell but it is
’ " and " ’
but you can’t have spaces in between the quotes or it’ll mess up the code)
This worked! Thank you Jesse, JTRTech, Memo, and BCEats!
Just one more question, how do I make it so that it only calls the script ONLY for clocked-in employees (orange-box)? (eg. ENTITY STATE:TCStatus $1 === ‘PunchIn’)
$1<br/>[= '{ENTITY STATE:TCStatus}' === 'PunchIn' ? {CALL:clockInTimeNew.clockIn('$1') : ''}]
doesn’t seem to work…
It won’t know what entity your looking at, would need to specify entity with the $1 in a report type expression.
Well, it already seems to know which Entity to pull up