Example of Writing a Fast Formula Using Formula Text

In this example, you use the text editor to create a fast formula.

Here are the key decisions when deciding on which formula to create:

Key Decisions

In This Example

Is the formula for a specific legislative data group?

No, this is a global formula that can be used by any legislative data group.

Are there any contexts used in this formula?

No

Are there any database item defaults?

Yes, PER_ASG_JOB_NAME

Are there any input value defaults?

No

What are the return values?

MIN_HOURS, MAX_HOURS, FREQUENCY

Creating a Fast Formula Using the Text Editor to Determine a Manager's Scheduled Hours

  1. Search for and select Fast Formulas in My Client Groups.

  2. Click Create.

  3. Complete these fields:

    Fields for the Fast Formula

    Values for the Fast Formula

    Formula Name

    Manager Range of Scheduled Hours

    Formula Type

    Range of Scheduled Hours

    Description

    Manager's Range of Hours

    Effective Start Date

    1-Jan-2010

  4. Click Continue.

  5. Enter these formula details in the Formula Text section:

    /* DATABASE ITEM DEFAULTS BEGIN */
    DEFAULT FOR per_asg_job_name IS ' '
    /* DATABASE ITEM DEFAULTS END */
    JOB_1 = PER_ASG_JOB_NAME
    IF JOB_1 = 'Manager' then
    (MIN_HOURS = 25
    MAX_HOURS = 40
    FREQUENCY = 'H')
    else
    (MIN_HOURS = 20
    MAX_HOURS = 35
    FREQUENCY = 'H')
    return MIN_HOURS, MAX_HOURS, FREQUENCY
  6. Click Compile.

  7. Click Save.