Status

Return present Status from Employee

 

EmployeeTimes/Status(EmployeeId as String)

 

Return if not present

{
    "code": 1,
    "present": false
}

 

If Empployee Id not existing, it return "present":false

 

 

Return if present

{
    "code": 1,
    "present": true,
    "shift": "",
    "startDateTime": "2021-06-21T14:00Z"
}

 

jbscript-logo-small

#jbs
let employeeId="6";
let r=bsl.get("EmployeeTimes/Status(:employeeId)");
alert("Employee "+employeeId+" - Present:"+r.present);