Administer > Application setup > Clocks > Start or stop a clock from a macro

Start or stop a clock from a macro

Applies to User Roles:

System Administrator

To start or stop a clock from a macro, follow these steps:

  1. Click Tailoring > Tailoring Tools > Macros.
  2. Click Add.
  3. Type or select the following information to describe your macro.

    FieldDescription
    Macro NameType the name of your new macro
    Applies WhenSelect the condition when your macro runs
    Macro Type
    • To start a clock select Start A Clock
    • To stop a clock select Stop A Clock
    Macro ConditionType true, or a condition statement that evaluates to true or false, to determine when to run the macro
  4. Click Set Parameters
  5. Type or select the following parameters to describe the clock.

    Field Description
    Name of Clock

    This value describes the name of the clock where Service Manager stores duration information. This name must uniquely identify the clock.

    • Select Fixed Key Field to type a specific clock name.
    • Select Evaluating Expressions to define a dynamic name based on an expression.

      Note An evaluating expression must contain the $L.name variable.

    Type of Clock

    This value describes the type of clock to start. Service Manager automatically places a value in this parameter based on your Macro Type selection.

    • Select Fixed Key Field to type a specific clock type.
    • Select Evaluating Expressions to define a dynamic clock type based on an expression.

      Note An evaluating expression must contain the $L.type variable.

    The possible clock type values are:

    • problem
    • downtime
    • cm3r
    • SLA
    • incidents
    Clock Key Field

    This value identifies the record, event, or object to track. This value must be unique throughout Service Manager. For a record, you can type number in $L.new to enter the unique ID associated with the record. Service Manager automatically places a value in this parameter based on your Macro Type selection.

    • Select Fixed Key Field to type a specific clock key field.
    • Select Evaluating Expressions to define a dynamic key field based on an expression.

      Note An evaluating expression must contain the $L.key variable.

  6. Click Save.
  7. Click OK.

Related topics

Clocks

Add a clocks record
Add a clock to track incident record status changes
Enable tracking of operator times
Start or stop a clock from format control
View a clock record