Siebel HelpDesk Guide > Setting Up Employee Self-Service >

Creating an Employee Self-Service Summary Form


A summary form is used to provide a read-only, summary of a completed form to an approver. The approver can review the information in a summary form, and then decide whether to approve or deny the request. As an administrator, you can use the Employee Self-Service module to create a summary form.

Preparation

Before you create a form, complete the following tasks:

  1. Map out the summary form. Use the flow diagram example shown in Figure 7 to help decide the pages to include in your form and the questions you want within each page.
    • The questions within a summary form are only used to display data to the user.
    • Use the requestor form that you previously created to help you determine which questions you want to use in the summary form. Typically, a summary form shows the approver only a subset of the most relevant responses from the requestor form.
  2. Determine the questions and the pages used in the summary form. For more information on creating SmartScript questions and pages, see Siebel SmartScript Administration Guide.
  3. If you plan to copy a question from the requestor form, add the word Summary to the title, as you cannot use the same names for both the requestor form question and the summary form question. This naming-convention rule also applies to naming pages and the SmartScript itself.

This task is a step in Process of Setting Up Employee Self-Service.

To create a summary form for an approver

  1. Navigate to the Site Map > Administration - SmartScript > Scripts view.
  2. In the Scripts list, add a new record, complete the fields, and save the script.

    The name should identify the form as a summary form. Do not use the same name as the requestor form.

    Leave the Type field empty. Do not set the Type field to Employee Self-Service because the summary form would then become visible to requestors. Two forms with similar names can confuse the requestors.

  3. Click the Programs view tab, and add a program record.
  4. In the Program record, choose Script_Open in the Name field.
  5. Choose eScript in the Program Language field.
  6. In the Script form, use eScript (or VBScript) to set up the summary form.

    After you finish scripting, release the script, test it, and then make necessary changes and release the script again.

    function Script_Open ()

    {

    var PageFirstPage;

    var QuestLastName;

    var szLastName = "";

    var szScriptSessionId = "";

    var boCallScripts;

    var bcCSRunAnswer;

    // Get the handles to the page and the questions

    PageFirstPage = GetPage ("PAF Summary");

    QuestLastName = PageFirstPage.GetQuestion ("PAF Summary Employee Last Name");

    // Set all the questions read-only

    QuestLastName.SetQuestionEnable (false);

    // Get the script session run id

    szScriptSessionId = GetParameter ("Session.ScriptSessionId");

    // Get the "Call Scripts" busobj and "Call Script Run Answers" buscomp

    boCallScripts = TheApplication().GetBusObject ("Call Scripts");

    bcCSRunAnswer = boCallScripts.GetBusComp("Call Script Run Answers");

    // Query for the employee's last name

    with (bcCSRunAnswer)

    {

    SetViewMode (AllView);

    ClearToQuery ();

    ActivateField ("Run Id");

    ActivateField ("Page Name");

    ActivateField ("Question Name" );

    ActivateField ("Answer Text" );

    SetSearchSpec ("Run Id", szScriptSessionId);

    SetSearchSpec ("Page Name", "PAF Which Change");

    SetSearchSpec ("Question Name", "Display Employee Last Name");

    ExecuteQuery (ForwardOnly);

    if (FirstRecord () != 0)

    szLastName = GetFieldValue ("Answer Text");

    }

    bcCSRunAnswer = null;

    boCallScripts = null;

    // Set the values of each question by the scripting

    QuestLastName.SetCurrentValue (szLastName);

    return;

    }

    NOTE:  The eScript form appears at the bottom on the page. You may need to scroll down to see the entire form.

Importing Field Values to a Summary Form

After the summary form is completed and submitted, the questions and answers are saved in SmartScript session table. For a summary form, the Script_Open script is used to read the values and assign them to the questions.

To import field values from requestor to summary form (without page breaks)

  1. Navigate to the Site Map > Administration - SmartScript > Scripts view.
  2. In the Scripts list, select the script and click the Programs view tab.
  3. In the Programs list, create a program.
  4. In the new program record, select Script_Open in the Name field, and eScript in the Program Language field.

    NOTE:  If you access a business component within your summary form, any operation to that business component creates a page break within the summary form. To avoid the page break, get the handle to the business component in the eScript. Perform any desired operations on it within the eScript. For more information, see Siebel Applications Administration Guide.

  5. (Optional) In the Script form, use the eScript function SetQuestionEnable(false) at Script_Open to set a question to read-only.

    For more information on making a field read-only, see Making a Field Read-Only.

  6. In the Script form, use the GetParameter function to get the script session ID.

    For more information on using GetParameter, see Siebel Applications Administration Guide.

  7. Query for the Call Scripts business object with Call Script Run Answers business component.

    For more information on ways to get the Call Scripts business object, see Siebel Applications Administration Guide.

  8. In the Programs list, click Save.
Siebel HelpDesk Guide Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Legal Notices.