cancel
Showing results for 
Search instead for 
Did you mean: 

Obtain the Description of a UDF from Set Valid Values for Field

Former Member
0 Kudos

I am trying to get the Description from a row level UDF in a Marketing Document for which I have created a List of Values.

I know the syntax for the UDF would be $[$38.U_Code.0], but that only returns the Code, how do I get the Description instead?

thx, Richard

Accepted Solutions (1)

Accepted Solutions (1)

former_member583013
Active Contributor
0 Kudos

Richard,

Your query should be something like

SELECT DISTINCT T1.Descr FROM [dbo].[CUFD] T0 
INNER JOIN [dbo].[UFD1] T1 ON T0.TableId = T1.TableId 
AND T0.FieldId = T1.FieldId 
WHERE T0.TableId = 'RDR1'  AND T0.AliasID = 'Code' AND T1.FldValue = $[$38.U_Code.0]

I have used RDR1 as table name as an example. You will need to substitute this with the actual rows table name

Suda

Answers (4)

Answers (4)

BattleshipCobra
Contributor
0 Kudos

This is demonstrated by previous posts in this thread, but here is an article explaining the steps in more detail: http://goo.gl/xuZZtV

Former Member
0 Kudos

Suda,

I figured out what to change but get no results

SELECT DISTINCT T1.Descr FROM [dbo].[CUFD] T0

INNER JOIN [dbo].[UFD1] T1 ON T0.TableId = T1.TableId

AND T0.FieldId = T1.FieldId

WHERE T0.TableId = 'INV1' AND T0.AliasID = 'Code' AND T1.FldValue = $[$38.U_List.0]

Former Member
0 Kudos

Try this one:

SELECT DISTINCT T1.Descr FROM dbo.CUFD T0

INNER JOIN dbo.UFD1 T1 ON T0.TableId = T1.TableId

AND T0.FieldId = T1.FieldId

WHERE T0.TableId = 'INV1' AND T0.AliasID = 'List' AND T1.FldValue = $[$38.U_List.0\]

Thanks,

Gordon

Former Member
0 Kudos

Thank you for the post Suda,

Could you please specify what the code would be if the UDF is U_List and I would be working in the INV1 table.

thx

Richard

Former Member
0 Kudos

Hi,

i do not any way to get this with a screen record. You can get the description of an UDF by using a query like this one :



SELECT T0.Descr FROM CUFD Where T0.TableID = 'INV1' AND T0.Alias = 'YourUdfName'

Regards Steffen