Highlighted
Absent Member.
Absent Member.
1618 views

A question on Combo boxes???

Jump to solution

I have a pre-populated Combo box (Dropdown Style = Dro[pdown list) with around 20 values in the list. (Name = Employ-Type)

I have incoming data from a field in a record called EMP-TYPE holding the value "Full Time".

I know for a fact that this value exists in my Combo box list somewhere...

Whats the code to seach for this value in my Combo Box so that I can set the ::SelectedIndex value to show the correct value in my list of possibles when it comes to displaying the screen?

0 Likes
1 Solution

Accepted Solutions
Highlighted
Absent Member.
Absent Member.

RE: A question on Combo boxes???

Jump to solution

I'm impressed!

Thanks...works a treat!

View solution in original post

0 Likes
2 Replies
Highlighted
Micro Focus Expert
Micro Focus Expert

RE: A question on Combo boxes???

Jump to solution

Something like this should work:

      01 compareField    string.

      01 emp-type          pic x(20)  value "Full Time".

          set compareField to emp-field

          set comboBox1::SelectedIndex to comboBox1::FindStringExact(compareField::TrimEnd(' '))

0 Likes
Highlighted
Absent Member.
Absent Member.

RE: A question on Combo boxes???

Jump to solution

I'm impressed!

Thanks...works a treat!

View solution in original post

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.