Solved

LISTAGG in a custom field


Userlevel 1
Badge +6

Hi Community,

we manufacture our products in different steps. We have several production orders for this. If there are special features, these are stored in a note field of a production order. In order to see this information in all production orders of a product, I wanted to create a CF and combine and display the different information with LISTAGG. However, when syschronising, I get the error that no data is found (ORA-01403). Is it possible to use the LISTAGG function in CFs at all?

 

Regards

André

icon

Best answer by InfFilipV 2 June 2022, 13:21

View original

6 replies

Userlevel 6
Badge +12

Hi @Andre Martin,
yes ListAgg is allowed.


Read Only MultiLine custom field | IFS Community


Unfortunately debugging of CF creation is quite complicated.
Do you use v and t aliases properly?

BR
Filip

Userlevel 1
Badge +6

Hi @InfFilipV ,

 

thank you for your quick answer.

I hope that I use the aliaes right.

 

In PL/SQL Developer it works well.

André

Userlevel 6
Badge +12

Hi @Andre Martin,
are you sure about that parameter? I think it should be v.CF$_NORDERNO.
Also try use :p1 instead of :CF$_NORDERNO (that prefix or $ could make some difference)
Or maybe should be better do reference via rowkey on LU where you are creating CF.

select LISTAGG(so.X) within group (so.Y) from view so where so.Y = (select a.Y from CURRENT_LU_CFV a where a.objkey = :rowkey)

with parameter t.rowkey or v.objkey
BR
Filip

Userlevel 1
Badge +6

Hi @InfFilipV,

i changed my statement and now it works, but it is too slow in that LU. 🙄

 

Thank you for your support.

André

Userlevel 6
Badge +12

Hi @Andre Martin,

rewrite that Get function to subselect, it shall speed up it little.

Userlevel 1
Badge +6

Hi @InfFilipV ,

in this case is “a litte” not enougt. 😏

Thank you and regards

André

Reply