Create a lookup to limit the jobs that display based on the
logged-in user's roles.
The logged-in user must have a VA User Profile
() that includes the following setup:
- On the Info tab, a Payroll company (PR
Co) and employee number (Employee field)
must be assigned.
- On the Roles tab, the user must have a role
assigned.
The following setup applies to your portal only, not to Vista.
-
In Vista, select .
-
On the Info tab, enter
udJobRoles.
-
Give the lookup a Title. For example,
Job Based on
Roles.
-
In FromClause, enter
JCJM.
-
For the Where Clause, enter
the following:
JCJM.JCCo = ? and JCJM.JobStatus
= 1 and DDUP.PRCo = ? and DDUP.Employee = ?
-
For the Join Clause, enter
the following:
INNER JOIN JCJobRoles on
JCJM.JCCo = JCJobRoles.JCCo and JCJM.Job = JCJobRoles.Job
INNER JOIN DDUP on JCJobRoles.VPUserName = DDUP.VPUserName
-
In Order by column,
enter 0.
-
Select the Details tab.
-
Add a JCJM.Job
column:
- ColumnName =
JCJM.Job
- ColumnHeading
= Job
- Datatype =
bJob
-
Add a
JCJM.Description column:
- ColumnName =
JCJM.Description
- ColumnHeadING
= Description
- InputType =
bDesc
-
Save your changes.
-
In Vista, add the custom lookup to the Job field in PR Timecard Entry.
-
Select .
-
Select an existing batch, or open a new
one.
-
On the Info tab, select the
Job field,
and press F3
to open field properties.
-
In the Field Seq# dropdown,
select 20 -
Job.
-
On the Lookups tab, add the
udJobRoles
field.
-
In the Parameters
field, enter 19,-2,-3.
-
Set the Load Seq # to
0, and
leave the Active checkbox unmarked.
-
Save your changes.
For more information on setting up lookups in Vista,
see Creating a Custom Lookup in Vista Help.