Christine_Chavez_6412

How to display the VARA values in a PromptSet - ComboBox

Discussion created by Christine_Chavez_6412 on Jul 21, 2016
Latest reply on Jan 20, 2017 by Michael_Lowry


You can set the combo box Property "Data reference" to {name of VARA}.


A combobox is set to always retrieve the first value (not the key) of the VARA object.

For example, I have a Static VARA called VARA.STATIC.BIND
gpbcglxdaudu.png

The ComboBox will be populated with values CONN.SQL.TAM, %CCH%, JOBS.TECH
wdmjiwzuvls4.png

Unfortunately, you can't populate the combobox with they Key values or value 2, 3, and so on

If you want to populate a ComboBox with a value other than value1 (eg: KEY value), a workaround would be to either:
1) create another VARA where the data that you want are in value1 column
2) create a script that will pull the Key value from (eg) VARA.STATIC.BIND, and insert the value in another variable (eg: VARA.KEY, and the use VARA.KEY in your ComboBox.  

:SET &CNT# = 1 :SET &HND#=PREP_PROCESS_VAR(VARA.STATIC.BIND) :PROCESS &HND# :   SET &KEY# = GET_PROCESS_LINE(&HND#,1) :SET &CNT# = FORMAT(&CNT#) :PUT_VAR VARA.KEY, &CNT#,&KEY# :SET &CNT# = ADD(&CNT#, 1) :ENDPROCESS

d9d2jd8x8ymi.png
u4ybldn3e2ny.png

Outcomes