Again the Newbie with another problem! Please !!!!

make

Member
One field(text), the second, I have made visible by an Combo box.
I put the screen-value VALUE of the Combo in a variable(named Lieferung), which of the type Char is. The other field is the Primary Key(Integer).
What i want to do :
I want to store the value of the associated Primary key in another variable.
How can I do that?

Greetings
make
For example :my Table:

PK Lieferung
------------------
1 Soup
2 Milk
3 Cream ......
 

jongpau

Member
Hi Make,

Try something like this:

Fill the combo-box (data type Integer) with LIST-ITEM-PAIRS being "Soup",1,"Milk",2,... (you can set the values in the combo-box from the database table ....).

When the user selects an option in the combo-box (or whenever you want this code to happen):
Code:
FIND TableName NO-LOCK WHERE
     TableName.KeyField EQ INTEGER(ComboBox:SCREEN-VALUE)
     NO-ERROR.
IF AVAILABLE TableName
THEN ASSIGN CharacterVar = TableName.DescriptionField.
I hope this is what you are trying to do... if not please explain a bit more what it is you are trying to accomplish.
 
Top