Automic Workload Automation

Expand all | Collapse all

Can Read only variables be defined using :READ statement

Jump to Best Answer
  • 1.  Can Read only variables be defined using :READ statement

    Posted 07-02-2018 02:54 PM

    Hello Team,

     

    Can Read only variables be defined using :READ Statement. I don't want the user to modify the default value and leave as is.

     

    Thanks in advance,

    Srujan.



  • 2.  Re: Can Read only variables be defined using :READ statement

    Posted 07-02-2018 05:32 PM

    Instead of using the :READ script statement, use a prompt set. In the prompt set, for the variable in question, specify these options:



  • 3.  Re: Can Read only variables be defined using :READ statement

    Posted 07-03-2018 06:13 AM

    I understand but I only want to achieve this using :READ. Is it possible?

     

    Thanks,

    Srujan.



  • 4.  Re: Can Read only variables be defined using :READ statement

    Posted 07-03-2018 05:18 AM

    If the value doesnt need to be shown to the user, you could also just set it as a constant in pre- or process tab:

     

    :CONST &VARIABLE1# = "VALUE1"

     

    :CONSTANT 



  • 5.  Re: Can Read only variables be defined using :READ statement

    Posted 07-03-2018 06:15 AM

    Hi vicja02

     

    No, I want to show the value to the user and need to confirm the displayed value or else cancel the job if they think the value is wrong. But he shouldn't edit that value. Hope you get the requirement.

     

    Thanks,

    Srujan.



  • 6.  Re: Can Read only variables be defined using :READ statement
    Best Answer

    Posted 07-03-2018 06:26 AM

    Hi patve03,

     

    understood, so if prompt set (as suggested by Michael Lowry) is not an option, try this:

     

    :READ &DEFAULT#,"'Default value'",'Please select','Default value'

     

    in this form you can't choose anything else as the "Default value" for the Variable &DEFAULT#

     

    Regards

    Jan



  • 7.  Re: Can Read only variables be defined using :READ statement

    Posted 07-04-2018 12:43 PM

    Perfect. This is what I needed.

     

    Thanks,

    Srujan.