Lookup a value - 02-19-2004 , 08:50 AM
I have a table with this kind of field:
ADD FIELD "MyField" OF "MyTable" AS character
VIEW-AS "VIEW-AS COMBO-BOX
LIST-ITEM-PAIRS ""Planned"", ""P"", ""Ordered"", ""O"", ""Filled"", ""F"",
""Complete"", ""C"", ""Distribute"", ""D"", ""History"", ""H"" "
I have a loop on this table in a non-visual procedure:
for each MyTable no-lock:
put MyField "," .
the result is something like:
but this result is wanted:
Is there somebody with a solution ?
Thank you, Stéphane.
Re: Lookup a value - 02-19-2004 , 09:21 PM
the LIST-ITEMS is a visual or a widgets attribute
you can create one using a FORM statement
then use it to get the labels
here goes -
WITH FRAME MyFrame.
/* now you got the LIST-ITEMS attribute to get the labels from
this is just a dummy frame to create the widget */
FOR EACH MyTable:
PUT MyField ","
LOOKUP(MyField, MyField:LIST-ITEMS IN FRAME MyFrame) - 1,
MyField:LIST-ITEMS IN FRAME MyFrame)
/* the LOOKUP finds the value in the list
and the ENTRY picks up the label behind him */
i haven't tried it out but in any case you get the idea
tell me if it works, HTH
stephane.delhautal (AT) libertysurf (DOT) fr (St?phane) wrote in message news:<f812f171.0402190650.54e1bb82 (AT) posting (DOT) google.com>...
Re: Lookup a value - 02-20-2004 , 01:36 AM
Thank you for your answer. But i specified that i wrote a NON-VISUAL procedure !
ranger101 (AT) hotmail (DOT) co.il (ranger) wrote in message news:<d6cdf6f8.0402191921.33f3d571 (AT) posting (DOT) google.com>...
Re: Lookup a value - 02-20-2004 , 08:16 AM
dear dear stephane what will i do with you
that it's completely fictitous it is just for reference
even if you're running in batch mode or closing your eyes
again you need this attribute to get the labels from
it's a visual attribute and the simplest way is to create one
but fictitously meaning it won't really show up it's just for reference
now be a good girl and go try it
god it's like teaching grandma to use the vcr
i give up with all those gapping idiots, good bye for now
stephane.delhautal (AT) libertysurf (DOT) fr (St?phane) wrote in message news:<f812f171.0402192336.7aa4d5c6 (AT) posting (DOT) google.com>...