cuiwenyuan
29th November 2005, 10:10
when time we will use this function?
I only know this function is used for an enumerated domain.
This function returns the description associated with a specific value in an enumerated domain.

when the filed in report,needn't this function.
but when export to file directly(use a no report session),must use this function to get the description.
why?
can anybody help me?
why this? thank you in advance. :p

below is my test code

extern domain tdpur.corg corg.g | PO Type (enumerated domain for enum.descr$())

corg.g=tdpur401.corg
message("%s",enum.descr$("tdpur.corg",corg.g,"2"))


the guide

Syntax
string enum.descr$(string domain_code(12), enum_expr
[, string language_code ] )

Arguments
domain_code
The name of the domain. The domain must be of type enumerated.

enum_expr
One of the possible values of the enumerated domain.

language_code
To retrieve the description in a language other than the user language, specify the relevant language code in this argument. This is an optional argument. The default language is the language of the user.

Note that the language code of the user is available in the predefined, read-only variable language$.

en@frrom
29th November 2005, 10:24
I am not 100% sure what you are trying to ask, but I use this function also for instance when displaying information on forms

Youp2001
29th November 2005, 12:16
when the filed in report,needn't this function.
I expect that in this case the standard program of Baan and/or the standard Baan reporting tool will call the functionality for getting the enum description in background.

but when export to file directly(use a no report session),must use this function to get the description.
Standard program cannot decide what you will have in the ascii file: the numerical value or the enum description. Therefor you have to write the code to get the enum description in you file.

Youp