Home > Forum > General > Attribute - view items

Attribute - view items
0

Hi,

Can I achieve such an effect in an calculated column?
In SQL it works but in webcon I have an error

If atrubut is empty display the grouped attribute from the item list

Code:

select
ISNULL(WFD_AttChoose5, STRING_AGG (CAST(DET_Att1 AS NVARCHAR(MAX)), ';'))
from WFElements W
left join WFElementDetails WD on W.WFD_ID = WD.DET_WFDID
group by WFD_AttChoose5


What needs to be corrected or is there no way to make it work?

In reply to: Jack

Hi Piotr,
Do you want to insert a calculated column in the report?
If yes, try this:
(SELECT ISNULL(WFD_AttChoose5, STRING_AGG (CAST(DET_Att1 AS NVARCHAR(MAX)), ';')) FROM WFElementDetails WD WHERE WD.DET_WFDID = wfelems.WFD_ID)

What type of error do you have?

Hi Jack,
yes i do.
I'm trying to insert a calculated column in the report.
Your solustion is almost good.
I modified your suggestion by adding the function dbo.ClearWFElem(value) but it doesn't work properly.
It 'clears' only the first item, the others no longer for example:

PV-SP-325-35B-M-0000;365ecad5-2183-46c9-a31f-daff14099705#ES-PY-BMS-SC1000

I Want to remove all characters before #
Do you have any ideas?