Baanboard.com

Go Back   Baanboard.com > Forum > Baan Quick Support: Functional & Technical > Tools Development

Retirement Notice

Baanboard is shutting down on 31-dec-2023. See: http://www.baanboard.com/baanboard/showthread.php?t=76043


User login

Frontpage Sponsor

Main

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

Reference Content

Reply
 
Thread Tools Display Modes
  #1  
Old 29th November 2023, 12:17
LordMrT LordMrT is offline
Member
 
Join Date: Nov 2020
Posts: 34
LordMrT is on a distinguished road
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
Reply With Quote
  #2  
Old 29th November 2023, 12:43
bdittmar's Avatar
bdittmar bdittmar is offline
Guru
 
Join Date: Apr 2002
Posts: 1,982
bdittmar will become famous soon enough
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
Reply With Quote
  #3  
Old 29th November 2023, 16:15
LordMrT LordMrT is offline
Member
 
Join Date: Nov 2020
Posts: 34
LordMrT is on a distinguished road
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.
Reply With Quote
  #4  
Old 30th November 2023, 12:46
LordMrT LordMrT is offline
Member
 
Join Date: Nov 2020
Posts: 34
LordMrT is on a distinguished road
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".
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Report design backup tion1976 Tools Development 3 15th September 2023 10:46
How to list the session that uses a report tion1976 Tools Development 2 23rd March 2023 11:03
How to create such a report selection list in Infor LN BaBernd Tools Development 11 17th November 2015 17:49
Select distinct records thru query extension?? arajasek Tools Development 5 25th August 2010 08:24
Displaying phantoms on the Materials List report David A. Green Tools Development 4 20th February 2002 10:27


All times are GMT +2. The time now is 01:15.


©2001-2023 - Baanboard.com - Baanforums.com