Automic Workload Automation

 View Only
  • 1.  Combobox usig Key value instead of Text

    Posted Jul 02, 2019 09:33 AM
    Hi guys,

    I'd like to use combobox just like html select/option. I have a VARA that looks like this:

    So I'd like to display Service and when it's selected in my Promptset the value of my variable should be 1. How can I achieve this?


  • 2.  RE: Combobox usig Key value instead of Text
    Best Answer

    Posted Jul 02, 2019 03:09 PM
    Hi

    unfortunately there is no option which columns should be taken for PRPT handling :-(
    ... at least I am not aware of any...

    You can use a little script to process the VARA and compare it with your Promptset value:

    :SET &HND# = PREP_PROCESS_VAR(VARA.MARCEL)
    :PROCESS &HND#
    : SET &KEY# = GET_PROCESS_LINE(&HND#,1)
    : SET &VAL1# = GET_PROCESS_LINE(&HND#,2)
    : IF &VAL1# = &COMBOBOX1#
    : SET &MYVALUE# = &KEY#
    : ENDIF
    :ENDPROCESS
    :CLOSE_PROCESS &HND#
    !
    :PRINT "KEY=&KEY# VAL1= &VAL1# MYVALUE= &MYVALUE#"

    where &COMBOBOX1# is your promptset variable.

    cheers Wolfgang

    ------------------------------
    I know I do really know it!
    ------------------------------



  • 3.  RE: Combobox usig Key value instead of Text

    Posted Jul 02, 2019 04:19 PM
    Another idea I've had (but haven't tried) is to set the Key value to match value1, and store the desired outcome as value2.  Then in the process script you should be able to use this as your result;

    get_var(VAR.NAME,&SELECTEDVALUE#,2)


  • 4.  RE: Combobox usig Key value instead of Text

    Posted Jul 02, 2019 04:32 PM
    The more I use Automic I get that I can't run from the script/process pane lol!

    Thanks for the quick reply and help guys, I hoped that scripting was not needed.

    ------------------------------
    Services Consultant
    HCL
    ------------------------------



  • 5.  RE: Combobox usig Key value instead of Text

    Posted Jul 03, 2019 02:57 AM
    If the Column usage is not fixed the more elegant & easier method!

    [CONFIRMED]

    :-)

    ------------------------------
    I know I do really know it!
    ------------------------------