Hello,
I have a combo box which permits to choose a country.
Below the table who contains the country list :
ISO Country
Code Name
---- -------
US USA
FR France
IT Italia
My RPG program needs the ISO code and the user have to see only de country Name (not the code).
How to see only the Name and return only the code ?
Display Choice option (combo box)
-
- Profound User
- Posts: 21
- Joined: Fri Jun 26, 2015 7:49 am
- First Name: Fadiga
- Last Name: Mamoud
- Company Name: Allianz Africa Services
- Zip / Postal Code: 00225
- Country: Ivory Coast
- Contact:
Display Choice option (combo box)
- Attachments
-
- c3.PNG (6.35 KiB) Viewed 594 times
-
- c4.PNG (3.53 KiB) Viewed 594 times
Last edited by Tracker on Fri Nov 06, 2015 7:48 am, edited 1 time in total.
-
- Experienced User
- Posts: 122
- Joined: Tue May 22, 2012 6:45 am
- First Name: Dieter
- Last Name: Schröder
- Company Name: Ecclesia Holding GmbH
- State / Province: Outside Canada/USA
- Country: Germany
- Contact:
Re: Display Choice option (combo box)
Hi,
i Think the solution is quite simple: The combo box has the attributes "choices" and "choice values". If you use a database driven selection there are the attributes "choice options field" and "choice values field". You have to use both fields (choices and values). Choices contains the data the user sees. Values contains the keys which are given to your RPG program. The bound field in your rpg program has to work with the values variable (eg. char(2)). It does not matter that the string which the user sees, is longer. That is not important for your rpg program.
I hove, my explanation is helpful.
Dieter
i Think the solution is quite simple: The combo box has the attributes "choices" and "choice values". If you use a database driven selection there are the attributes "choice options field" and "choice values field". You have to use both fields (choices and values). Choices contains the data the user sees. Values contains the keys which are given to your RPG program. The bound field in your rpg program has to work with the values variable (eg. char(2)). It does not matter that the string which the user sees, is longer. That is not important for your rpg program.
I hove, my explanation is helpful.
Dieter
-
- Profound User
- Posts: 21
- Joined: Fri Jun 26, 2015 7:49 am
- First Name: Fadiga
- Last Name: Mamoud
- Company Name: Allianz Africa Services
- Zip / Postal Code: 00225
- Country: Ivory Coast
- Contact:
Re: Display Choice option (combo box)
I would like that after clicking on the choice option ,the combo box displays option that choosen .not choice value .problem is not the length .
-
- Experienced User
- Posts: 122
- Joined: Tue May 22, 2012 6:45 am
- First Name: Dieter
- Last Name: Schröder
- Company Name: Ecclesia Holding GmbH
- State / Province: Outside Canada/USA
- Country: Germany
- Contact:
Re: Display Choice option (combo box)
Ah,i think now i understand your problem. You want that after the user has selected a value the option (long text) should be visisble in you combo box field. If this is correct, i think, a combo box is the wrong widget. If you use a drop down box you can have this behaviour. In a drop down box the user always sees the option text. In the background the value key is sent to your rpg program.
I think, the idea behind a combo box is, that the user can directly type the key. If he does not know the key he can select the key from the choice listing (long textes). It is normal that the selected value is a key, not the choices text.
Try a drop down box.
Dieter
I think, the idea behind a combo box is, that the user can directly type the key. If he does not know the key he can select the key from the choice listing (long textes). It is normal that the selected value is a key, not the choices text.
Try a drop down box.
Dieter
-
- Experienced User
- Posts: 2711
- Joined: Wed Aug 01, 2012 8:58 am
- First Name: Scott
- Last Name: Klement
- Company Name: Profound Logic
- City: Milwaukee
- State / Province: Wisconsin
Re: Display Choice option (combo box)
I agree with Dieter. A combo box is the wrong widget for what you're trying to do. Since the combo box lets the user type any value (even one that's not in the drop-down list) it has to be able to show the actual values returned to the RPG program.
I think you probably want the regular "drop down" widget (aka select box widget).
I think you probably want the regular "drop down" widget (aka select box widget).
-
- Profound User
- Posts: 21
- Joined: Fri Jun 26, 2015 7:49 am
- First Name: Fadiga
- Last Name: Mamoud
- Company Name: Allianz Africa Services
- Zip / Postal Code: 00225
- Country: Ivory Coast
- Contact:
Re: Display Choice option (combo box)
Thank you .I'll use drop down box.
Who is online
Users browsing this forum: No registered users and 4 guests