Previous
Previous
 
Next
Next

Creating Lists of Values

Next, you create lists of values for jobs, employees, and departments.

Creating a List of Values for Jobs

To create a list of values for jobs:

  1. Click Application on the Developer toolbar (at the bottom of the page).

  2. Click 4 - Create/Edit Employee.

  3. Under Shared Components, Lists of Values, click the Create icon. The Create icon resembles a plus sign (+) that overlaps a small page.

    Description of bldapp_criconlov.gif follows
    Description of the illustration bldapp_criconlov.gif

    The Create List of Values Wizard appears.

  4. For Source, accept the default, From Scratch, and click Next.

  5. For Name and Type:

    1. Name - Enter JOBS.

    2. Type - Select Dynamic.

    3. Click Next.

  6. 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).

  7. 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.

Creating a List of Values for Employees

To create a list of values for employees:

  1. Under Lists of Values, click the Create icon.

  2. For Source, accept the default, From Scratch, and click Next.

  3. For Name and Type:

    1. Name - Enter EMPLOYEES.

    2. Type - Select Dynamic.

    3. Click Next.

  4. 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
    
  5. Click Create List of Values.

Creating a List of Values for Departments

To create a list of values for departments:

  1. Under Lists of Values, click the Create icon.

  2. For Source, accept the default, From Scratch, and click Next.

  3. For Name and Type:

    1. Name - Enter DEPARTMENTS.

    2. Type - Select Dynamic.

    3. Click Next.

  4. For Query or Static Values, replace the existing text with this:

    SELECT department_name d, department_id v
        FROM oehr_departments
        ORDER BY d
    
  5. Click Create List of Values.