Automic Workload Automation

Expand all | Collapse all

Load prompt set default values from last-used values

  • 1.  Load prompt set default values from last-used values

    Posted 02-12-2018 12:35 PM
      |   view attached

    About a year ago, I devised a way to automatically save & load last-used settings in prompt sets. The trick is to use {VARA,KEY,COLUMN} references to EXEC VARAs in the default values of the PRPT elements. Due to some bugs in the Automation Engine, the approach was not reliable. However, with v12.1.1 these bugs are fixed and the approach is viable. I am attaching a set of objects that demonstrate the approach.

    puowkqnukpxb.pnghttps://us.v-cdn.net/5019921/uploads/editor/s6/puowkqnukpxb.png" width="405">
    The first time the workflow is run, initial default values are loaded from the object UC0.LAST_USED_SETTINGS.INITIAL_DEFAULT_VALUES.VARA_STATIC.

    srkvscvhvn7v.pnghttps://us.v-cdn.net/5019921/uploads/editor/nw/srkvscvhvn7v.png" width="405">
    Select different values and click Done. The values will be saved in a new static VARA whose name is based on your user name. The next time you run the workflow, these values will be loaded as the defaults.

    Enjoy!

    Attachment(s)



  • 2.  Load prompt set default values from last-used values

    Posted 02-13-2018 07:55 AM
      |   view attached

    Here is an updated version of the workflow with reset & save controls.

    First, there is a new control — a combo box — that lets you save the currently-selected values as the defaults to use next time.
    ux11el6e6xdh.pnghttps://us.v-cdn.net/5019921/uploads/editor/xh/ux11el6e6xdh.png" width="405">
    Click the Save settings combo box to immediately save the currently-selected defaults. Even if you later click Cancel to abort execution of the workflow, the defaults will still be saved for the next time you run the workflow.

    meu599pcvde2.png
    When you click on the combo box, it executes a script to save the currently-selected settings. It then reads them again from the static VARA to confirm that they were saved correctly. The result is displayed in the menu that pops up. If the defaults were saved successfully, the text “Defaults saved successfully” appears. If the defaults could not be saved for any reason, the text “Defaults NOT saved successfully” appears.

    Next, there’s a simple check box that can be used to reset the values of all fields.
    4sfd2lfzropx.pnghttps://us.v-cdn.net/5019921/uploads/editor/w7/4sfd2lfzropx.png" width="405">
    Click the Reset all fields check box to blank-out all fields in the prompt set.

    There is currently no way to reset fields back to their default values. This would be a great feature, because it would make it possible to automatically populate fields based on the values selected in other fields. I have an enhancement request open about this: When resetting prompt set fields, honor default values, and reevaluate any variables therein. Please vote for the idea if you would find it useful.

    Attachment(s)