cancel
Showing results for 
Search instead for 
Did you mean: 

Formatted Search Query

Former Member
0 Kudos

Hi All,

I am trying to apply a formatted seach to run a query, but I am struggling so any advise would be greatly appreciated.

I am trying to accomplish the following;

When the quantity field has been populated in a purchase order I want to multiply that with the amount displayed in the 'Items Per Purchase Unit' field on the OITM of the item selected.

The query I currently have return various values which doesnt even make sense. So obviously there is something wrong with my query;

{SELECT T0.[NumInBuy] * $[$38.U_QTY.0] FROM OITM T0 WHERE T0.[ItemCode] = $[$38.1.0]}

If anyone could assist I would appreciate it.

Thanks,

Wynand Cilliers.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

DECLARE @A NUMERIC (16,2)
DECLARE @B NUMERIC (16,2)
SET @A=$[$38.11.0]
SET @B=$[$38.213.0]
SELECT @A*@B

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi,

you can do the same behaviour without FS, using Factor 1 field under item master data, Purchase Tab..

Regards,

Giovanni

Former Member
0 Kudos

Hi Wynand

Any reason why you are multiplying by U_Qty and not the standard quantity field? Surely the result must be in U_Qty and not the formula based on this field. This is causing your problem.

Kind regards

Peter Juby

Former Member
0 Kudos

Hi Peter,

The U_QTY field is where the user will enter their qty (I wrongly stated in my 1st post), and then the actual quantity should be calculated in the Quantity field. The reason for this is that we are calculating back to KG's if you only know the quantity in Litres that you want to order.

Hope this explains a bit better.

Regards,

Wynand