Skip to Content
avatar image
-1
Former Member

FMS query erroring out Help

Hi All

When i want to sum up quantities of each item to an UDF in Sales Order I get an following error.

SELECT SUM(Quantity) FROM ORDR, RDR1 WHERE U_NoOfPcs=$[RDR1.quantity.number]

Incorrect syntax near 'RDR1.quantity.number'.

Thanks in Advance

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • May 15, 2017 at 11:01 AM

    Hi,

    That query makes no sense at all.

    Don't you mean that FMS to be in the U_NoOfPcs UDF, triggered by each change in DocTotal, and shouldn't the query be something like this?

    SELECT SUM(ISNULL(t1.Quantity,0)) 
    FROM ORDR t0
         INNER JOIN RDR1 t1 ON t0.DocEntry = t1.DocEntry
    WHERE t0.DocNum = $[ORDR.DocNum]

    Regards,

    Johan

    Add comment
    10|10000 characters needed characters exceeded

  • May 15, 2017 at 11:55 AM

    Hi,

    Could you post your working FMS here to check? Your first post and reply is not related.

    Regards,

    Nagarajan

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Kindly help me for creating dropdown list for UDF...

      My task is:

      I've mapped some attributes( user defined table ) to an item in OITM

      Now mapped attributes only have to display in UDF at Sale order but here all attributes are showing.