ltannous
18th January 2005, 21:28
How can I export the values using exchange for an enum field and the value of a realted field (example for the enum field value 4 is being exported instead of the word Closed)
Darren Phillips
19th January 2005, 00:32
you could use an exchange condition script
rrankinmba
19th January 2005, 15:26
Since the enum value is numeric you will need to export the value in a different field. This condition is added to a field after the enum to return the string.
table tcadd010
domain tcmcs.str3 yesno
if tcadd010.multiack - tcyesno.yes then
yesno = "yes"
else
yesno = "no"
endif
return(yesno)
You could also use a query if you don't want the enum field in you file.
table tcadd010
domain tcmcs.str3 yesno
select *
from tcadd010
where tcadd010.cuno = :tcadd010.cuno
selectdo
if tcadd010.multiack - tcyesno.yes then
yesno = "yes"
else
yesno = "no"
endif
endselect
return(yesno)
lbencic
19th January 2005, 16:32
Hi - you can also use the function enum.descr$ to get the string description of any enumerated domain value. So, have the condition return a string, as shown above, but all you need is:
return(enum.descr$("field domain", field, [language]))
So, parts of the example from above can be rewritten:
return(enum.descr$("tcyesno", tcadd010.multiack))
ltannous
19th January 2005, 21:47
Thanks for all your help, it works great.