cancel
Showing results for 
Search instead for 
Did you mean: 

Calculation at run time

Former Member
0 Kudos

Hello,

I have a udf at row level which picks numeric value fro item master.

Now on delivery doc, say if i have two or three items with different values in this udf, is it possible to get sum in a different udf at title level?

What should be the udf type at title level? Will this have an impact?

ex.  Item 1   row Udf1-> 5.00

      Item 2   row Udf1-> 5.00

result in Title udf-> 10.00

Rgds,

RR

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Rudra

This is not possible as the FMS function does not have a row referencing system to use. It will always get the first rows value. The only work around is to set it to Refresh regularly and then get the actual values from the table. To make it work, you need to add the document, then go back to the document and Update.

Kind regards

Peter Juby

Former Member
0 Kudos

Hello Peter,

Can you help with the query?

Former Member
0 Kudos

Hi Rudra

Try this:

SELECT SUM(T0.[U_FieldName]) FROM DLN1 T0 WHERE T0.DocNum = $[$8.0.0]

Save this query and link it to the header field FMS.

Kind regards

Peter Juby

Former Member
0 Kudos

Hello,

I modified it but not working:

SELECT SUM(DLN1.[U_invqty]) FROM DLN1 Inner join DLN1.Docentry = ODLN.Docentry WHERE ODLN.DocNum = $[$8.0.0]

Rgds,

RR

Former Member
0 Kudos

Hi Rudra

I forgot to link to the header, my apologies. Try this:

SELECT SUM(T0.[U_invqty]) FROM DLN1 T0 INNER JOIN ODLN T1 ON T0.DocEntry = T1.DocEntry WHERE T1.DocNum = $[$8.0.0]

Kind regards

Peter Juby

Answers (1)

Answers (1)

KennedyT21
Active Contributor
0 Kudos

HI Rudura..

Try with this FMS change with the udf field

SELECT SUM(D0.[U_UDF]) FROM DLN1 D0

INNER JOIN ODLN D1 ON D0.DocEntry = D1.DocEntry

WHERE D1.DocNum = $[$8.0.0]

Regards

Kennedy