Skip to Content
-1

FMS query erroring out Help

May 15, 2017 at 10:02 AM

94

avatar image

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

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

Johan Hakkesteegt May 15, 2017 at 11:01 AM
0

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

Show 3 Share
10 |10000 characters needed characters left characters exceeded

Thanks but for a particular sale order i need to calculate no of pieces of various styles

the below worked for me but I cant able to update automatically. For the updation i need to select picker's indicator

select sum(quantity) from RDR1 where DocEntry=N'14'

0

Unfortunately I cannot see your screen, I cannot access your database, and I cannot read your mind.

Please give us a little more details, about the scenario, and the (user defined) fields involved.

0

The above is the working FMS and i modified to my first post and worked.

0
Nagarajan K May 15, 2017 at 11:55 AM
0

Hi,

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

Regards,

Nagarajan

Show 1 Share
10 |10000 characters needed characters left characters exceeded

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.

0