Lookup a value

sdelhautal

New Member
I have a table with this kind of field:

ADD FIELD "MyField" OF "MyTable" AS character
FORMAT "x(10)"
INITIAL "P"
LABEL "MyLabel"
POSITION 25
SQL-WIDTH 20
VIEW-AS "VIEW-AS COMBO-BOX
LIST-ITEM-PAIRS ""Planned"", ""P"", ""Ordered"", ""O"", ""Filled"", ""F"",
""Complete"", ""C"", ""Distribute"", ""D"", ""History"", ""H"" "
LENGTH 0
ORDER 50

I have a loop on this table in a non-visual procedure:

for each MyTable no-lock:
put MyField "," .
end.

the result is something like:
P,O,F,C

but this result is wanted:
P,Planned,O,Ordered,D,Distribute

Is there somebody with a solution ?
 
A solution to what? You question makes no sense whatsoever.

>the result is something like:
>P,O,F,C

Of course it is.

>but this result is wanted:
>P,Planned,O,Ordered,D,Distribute

The field is just a character field that can contain any value. The LIST-ITEMS-PAIRS that you see is just a range of possible values that the field can be set to when the field is display on a UI. But it can only be set to one of these values.

The words "Planned", "Ordered" and "Distribute" are used for display only. The P,O and D are what would be stored in the field. Each record can have a different one of these values.

Are you trying to get the list from the field? If so, that isn't possible directly.
 
Back
Top