Highlighted
frand1 Super Contributor.
Super Contributor.
103 views

Can I put a variable value in a dialogue system list box?

Jump to solution

We are still using dialogue system screens for the most part.

I have a screen with a list of reasons users can select, but they want to be able to insert variables into some of the reasons:  For example, on reason three, user would want to fill in the nnnnn to indicate the cost of painting the house.  Can this be done with a list box?

------------------------------------------------------------------

The house was green

The house was red

The house was yellow and cost nnnnn to paint.

The house was white

--------------------------------------------------------------------

Labels (3)
0 Likes
1 Solution

Accepted Solutions
Micro Focus Expert
Micro Focus Expert

Re: Can I put a variable value in a dialogue system list box?

Jump to solution

I am not really sure what it is that you wish to do here.

A standard Listbox control is a display only control where you can select one or more entries with the mouse or keyboard and those entries can be returned to the program. You cannot directly enter data into a list box.

You can dynamically set the contents of a list box at run-time however by associating it with a group item in your screenset that defines an array of fields. Whatever value the associated fields in the DATA-BLOCK are set to when the screen is displayed is what will appear in the Listbox. You can change the value of the fields by having a user type a value into an entry field and then string this together with the rest of your value to create a new field value and then do a REFRESH-OBJECT on the Listbox and the new value will appear.

If you actually want the user to be able to enter a value into a selectable control you will have to use something different like an ActiveX grid control or a 3rd party control.

2 Replies
Micro Focus Expert
Micro Focus Expert

Re: Can I put a variable value in a dialogue system list box?

Jump to solution

I am not really sure what it is that you wish to do here.

A standard Listbox control is a display only control where you can select one or more entries with the mouse or keyboard and those entries can be returned to the program. You cannot directly enter data into a list box.

You can dynamically set the contents of a list box at run-time however by associating it with a group item in your screenset that defines an array of fields. Whatever value the associated fields in the DATA-BLOCK are set to when the screen is displayed is what will appear in the Listbox. You can change the value of the fields by having a user type a value into an entry field and then string this together with the rest of your value to create a new field value and then do a REFRESH-OBJECT on the Listbox and the new value will appear.

If you actually want the user to be able to enter a value into a selectable control you will have to use something different like an ActiveX grid control or a 3rd party control.

frand1 Super Contributor.
Super Contributor.

Re: Can I put a variable value in a dialogue system list box?

Jump to solution

Thanks.  That would work.

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.