Display Choice option (combo box)

Use this board to ask questions or have discussions with other Rich Displays users.
Post Reply
Tracker
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)

Post by Tracker »

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 ?
Attachments
c3.PNG
c3.PNG (6.35 KiB) Viewed 605 times
c4.PNG
c4.PNG (3.53 KiB) Viewed 605 times
Last edited by Tracker on Fri Nov 06, 2015 7:48 am, edited 1 time in total.
dieter
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)

Post by dieter »

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
Tracker
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)

Post by Tracker »

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 .
dieter
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)

Post by dieter »

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
Scott Klement
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)

Post by Scott Klement »

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).
Tracker
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)

Post by Tracker »

Thank you .I'll use drop down box.
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests