Job Override Lookup Example
Set up a query to limit jobs based on the logged-in user.
This sample logic restricts jobs available to PRDept "PLMB" to only the NWMECH Department open jobs, and all other employees can see all open jobs.
You must be a System Admin to complete these steps.
- Create a new lookup in
select kJCJM.KeyID as ChoiceShortName, kJCJM.Job + ' - ' + kJCJM.Description as ChoiceLongName from kJCJM
inner join kJCCM on kJCJM.JCCo = kJCCM.JCCo and kJCJM.Contract = kJCCM.Contract
cross apply (
select kPREH.PRDept from HRAuthToken
Note: Use the authtoken provided by the portal to authenticate the currently logged-in user.inner join kPREH on HRAuthToken.PRCo = kPREH.PRCo and HRAuthToken.Employee = kPREH.Employee
where AuthToken = @AuthToken
) PRDeptCheck
where kJCJM.JobStatus = 1Note: Show open jobs only.and 1 = CASE WHEN PRDeptCheck.PRDept = 'PLUMB' AND kJCCM.Department = 'NWMECH' THEN 1
Note: If logged in user is a plumber based on PR dept, limit jobs to only NW Mechanical based on department.WHEN PRDeptCheck.PRDept <> 'PLUMB' THEN 1
Note: NOTE: if logged on user is not a plumber, no restriction.ELSE 0 END
, and add the following query. - Assign the lookup to the portal setting Job Override Lookup located under .