Automic Workload Automation

 View Only
  • 1.  GET_VAR inside variables and prompts

    Posted Dec 02, 2016 12:05 PM
    I have defined a STATIC VARA, "SCORING_VARA"
    variable
    log_dir = "var/log/test.log"
    Is it possible to get the value of this variable inside variables and prompts section of a job ?
    GET_VAR(VARA.SCORING_VARA, "log_dir ")



  • 2.  GET_VAR inside variables and prompts
    Best Answer

    Posted Dec 02, 2016 03:02 PM
    Yup.  Populate the Promptset like so;

    {VARA.SCORING_VARA,LOG_DIR,1}

    For this to work, you must toggle the Promptset row so that the variable name is displayed.


  • 3.  GET_VAR inside variables and prompts

    Posted Dec 02, 2016 03:16 PM
    {SCORING_VARA} returns log_dir directly under variables, not prompt sets. Just wondering if this would work consistently on higher versions or not.


  • 4.  GET_VAR inside variables and prompts

    Posted Dec 02, 2016 04:48 PM
    I think we have been putting them in promptsets since V9? I could be wrong.  

    If you code it into the promptset object itself, then just put it in as the default value.

    Here is a working example of how to do it from the job.  Note that the three fields with variables are showing the variable names (e.g. SERVER#).  This is accomplished by toggling the field, which is accomplished by clicking on the fields label.  If you don't toggle the field, then your string is not resolved.
    h8083vz1fcy7.jpghttps://us.v-cdn.net/5019921/uploads/editor/vn/h8083vz1fcy7.jpg" width="748">