Home > Building Your Application > Displaying Items as Select ... > Creating Lists of Values
Previous |
Next |
Next, you create lists of values for jobs, employees, and departments.
To create a list of values for jobs:
Click Application on the Developer toolbar (at the bottom of the page).
Click 4 - Create/Edit Employee.
Under Shared Components, Lists of Values, click the Create icon. The Create icon resembles a plus sign (+) that overlaps a small page.
The Create List of Values Wizard appears.
For Source, accept the default, From Scratch, and click Next.
For Name and Type:
Name - Enter JOBS
.
Type - Select Dynamic.
Click Next.
For Query or Static Values, replace the existing text with this:
SELECT job_title d, job_id v FROM oehr_jobs ORDER BY d
Note that the first column selected is the one displayed to the user (d), and the second is the value stored in or retrieved from the database (v).
Click Create List of Values.
Shared Components do not appear on this Page Definition until they are explicitly added to this page. You add them later in this tutorial.
To create a list of values for employees:
Under Lists of Values, click the Create icon.
For Source, accept the default, From Scratch, and click Next.
For Name and Type:
Name - Enter EMPLOYEES
.
Type - Select Dynamic.
Click Next.
For Query or Static Values, replace the existing text with this:
SELECT first_name ||' '|| last_name d, employee_id v FROM oehr_employees ORDER BY last_name
Click Create List of Values.
To create a list of values for departments:
Under Lists of Values, click the Create icon.
For Source, accept the default, From Scratch, and click Next.
For Name and Type:
Name - Enter DEPARTMENTS
.
Type - Select Dynamic.
Click Next.
For Query or Static Values, replace the existing text with this:
SELECT department_name d, department_id v FROM oehr_departments ORDER BY d
Click Create List of Values.