Highlighted
Absent Member.
Absent Member.
1761 views

[archive] Combo-box

[Migrated content. Thread originally posted on 08 August 2005]


        01 CLIENT-TABLE OCCURS 100.
             05 CLIENT-ALPHACODE       X(15).
             05 FILLER                 X(3).
             05 CLIENT-NAME            X(35).


Example Combo-box :
IMPERIAL IMPERIAL
IMPERIAL IMPERIAL MEAT COMPANY

If a combo-box is filled with the above data, and there are different CLIENT-ALPHACODE that are the same ... if you choose the second CLIENT-ALPHACODE, the combobox allways returns as if you selected the first CLIENT-ALPHACODE.

How come and what to do about it ?
0 Likes
4 Replies
Highlighted
Absent Member.
Absent Member.

RE: [archive] Combo-box

How are you testing for the value 'returned' by the combo-box?

Are you using the VALUE field or the SELECTION-INDEX number?

Obviously, if you are using the VALUE of the combo-box then it will be the same for both the records you've shown.

Using the SELECTION-INDEX should always yield the actual line number within the list that you selected.
0 Likes
Highlighted
Absent Member.
Absent Member.

RE: [archive] Combo-box

I just press F4 to open the list of the combo-box.

There I see then for example :
IMPERIAL IMPERIAL
IMPERIAL IMPERIAL MEAT

When you want to go to 'IMPERIAL IMPERIAL MEAT' with your cursor, it jumps back to 'IMPERIAL IMPERIAL'.

Strange behavior or not ?
0 Likes
Highlighted
Absent Member.
Absent Member.

RE: [archive] Combo-box

How is the combo box defined in the screen section?
0 Likes
Highlighted
Absent Member.
Absent Member.

RE: [archive] Combo-box

I have a problem, when I read from the file I want to display wherever I have in my file in the combo-box but always it shows me the 3rd one CSV

working-storage

01 combo-box-choices.
03 pic x(03) value "PDF".
03 pic x(03) value "rpt".
03 pic x(03) value "CSV".
03 pic x(03) value "TXT".
78 number-of-combo-choices value 4.

01 combo-choice
redefines combo-box-choices
occurs number-of-combo-choices times
indexed by combo-idx pic x(3).

77 add-item-1 pic x(03).


01 combo-data-1 pic x(03).


........
screen section.

01 screen-1
03 combo-1 combo-box using combo-data-1
column + 2 lines 5 size 9
notify-selchange,
mass-update = fast-update-flag
exception procedure disp-elem.
...

procedure division.
..

modify combo-1, item-to-add = table combo-choice.
...

when I read my file
move file-field-1 to combo-data-1.
display screen-1.

disp-elem section.
move combo-data-1 to file-field-1.
display screen-1.
disp-elem-exit.
exit.




Doesn't show me the file-field that I read.
combo-1 is showing me the 3rd combo-box-choices CSV

can somebody help me, what is wrong?
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.