cancel
Showing results for 
Search instead for 
Did you mean: 

Query for Auto Calculation based on input of 2 Fields

RajuParmar
Participant
0 Kudos

Hi,

I would like to write a sql query to allow for auto calculation based on the Inputs of 2 other fields before Adding the Order.

For example. A query on Sales Order where I have Item 040634 (Code for a Flower) and Quantity 200.

I have a UDF (Bunching) where the value is 10, 15 or 20.

Based on the Bunching the result should be given in another UDF (Noofsleeves).

(Quantity) 200 / (Bunching) 10 = 10 (Noofsleeves)

The Order will be having multiple items where the Bunching can differ for each item.

Is it also possible to remove the calculated noofSleeves from Inventory.

I am using 2007A SP01 PL05

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi ,

You may try this: Apply this fms on other udf and auto refresh on the udf mentioned in the query (in your case Bunching).

 SELECT $[RDR1.Quantity.number] / $[RDR1.U_UDF.number] 

You may check these too.

Thanks,

joseph

Edited by: Joseph Antony on Jul 8, 2010 12:31 PM

RajuParmar
Participant
0 Kudos

Dear Joseph,

I have treid the query but get message

Internal error (-1003) Occurred (Message 131-183)

The UDF U_Bunching and U_Noofsleevesis are Numeric.

Also note that the Order has not yet been Added

Former Member
0 Kudos

Hi,

The query given is for FMS - Formatted Search

Former Member
0 Kudos

You may try this:

$[$38.11.NUMBER\]/$[RDR1.U_Bunching.number\]

Note that it will not be runnable from query manager. It may only run as an FMS.

Thanks,

Gordon