Retirement Notice
|
|
User login
|
|
Frontpage Sponsor
|
|
Poll
|
What do you expect from your SI Implementation partner for the success of ERP implementation. Bring best practices - Not to offer more CR's Leveraging standard functions 20% Need more honesty to work with the Users until their processes are fully mapped & Users are trained 40% Focus on process automation/ integrations/ Real time data/ BI analytics 13% Stick to basics 27% Total votes: 15 |
|
|
 |

29th November 2023, 12:17
|
Member
|
|
Join Date: Nov 2020
Posts: 34
|
|
Baan: 10.7 -
DB: Oracle -
OS: InforLN 10.7
|
Report Extension - select list entry by enum
Baan: Infor ERP 10.7 C/S: Client
Hello everyone,
I have created a new CDF field of type List at table level. Now I would like to select this field in a report and output the description in the report.
How can I select the description of the list entry in an SQL? I get the enum value but not the description from the list.
Here is my current SQL query:
Code:
select atcibd001.cdf_sub1 :reach_gefahr_nr1,
atcibd001.cdf_sco1 :ext.reach_konz1
from tcibd001 atcibd001
where atcibd001._index1 = {:sh.line.item}
selectdo
select atxibd005.subs :ext.reach_gefahr1,
atxibd005.casn :ext.reach_cas1
from txibd005 atxibd005
where atxibd005._index1 = {:reach_gefahr_nr1}
selectdo
endselect
endselect
The CDF Listfield is: atcibd001.cdf_sco1
Thank you very much
|

29th November 2023, 12:43
|
 |
Guru
|
|
Join Date: Apr 2002
Posts: 1,982
|
|
Baan: 2.2/3.1/4c4/LN6.1 FP6/FP9/HiDox Tools 10.7/D.3 -
DB: tbase, ms-sql7, oracle10gV1, 11g, 12c, 19c -
OS: HP-UX, W2K3, SLES, RHLE
|
enum ?
Hello,
are you searching for the enum description ?
Code:
enum.descr$()
Syntax:
function string enum.descr$ (string domain_code(12), enum_expr [, string language_code])
Description
This returns the description associated with a specific value in an enumerated domain.
Arguments
string domain_code(12) The name of the domain. The domain must be of type enumerated.
enum_expr One of the possible values of the enumerated domain.
[string 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$.
Return values
The description of the specified enumerate value, either in the current user language or in another specified language.
The function returns an empty string, and displays an error message, if an unknown domain is specified or if no description exists in the data dictionary for the specified language.
Context
This function is implemented in the porting set and can be used in all script types.
Example
This example assumes an enumerated domain 'tcyesno' with two possible constants: 'tcyesno.yes' and 'tcyesno.no'. It also assumes that 1 is the language code for Dutch, 2 is the language code for English, and 3 is the language code for German. English is the current user language.
domain tcyesno active | enumerated domain
string descr(25)
active = tcyesno.no
descr = enum.descr$("tcyesno", active, "1") | descr contains "nee"
descr = enum.descr$("tcyesno", active) | descr contains "no"
descr = enum.descr$("tcyesno", active, "3") | descr contains
"nein"
__________________
//Bernd
|

29th November 2023, 16:15
|
Member
|
|
Join Date: Nov 2020
Posts: 34
|
|
Baan: 10.7 -
DB: Oracle -
OS: InforLN 10.7
|
Hello,
no, as far as I know this is the wrong function. My CDF does not have a domain but is of the data type list. The list entries are maintained via references.
|

30th November 2023, 12:46
|
Member
|
|
Join Date: Nov 2020
Posts: 34
|
|
Baan: 10.7 -
DB: Oracle -
OS: InforLN 10.7
|
Hello, I have found the solution. The following function is necessary:
Quote:
enum.descr$()
Syntax:
function string enum.descr$ (string domain_code(12), enum_expr [, string language_code])
Description
This returns the description associated with a specific value in an enumerated domain.
Arguments
string domain_code(12) The name of the domain. The domain must be of type enumerated.
enum_expr One of the possible values of the enumerated domain.
[string 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$.
|
ext.reach_konz1 = enum.descr$("tccdf_lstcon", konz1, "3")
It is important that the value with the correct domain is selected. In my case, this was the automatically generated one "tccdf_lstcon".
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
|
|
Thread Tools |
|
Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|