cancel
Showing results for 
Search instead for 
Did you mean: 

Variable in a Query

Former Member
0 Kudos

Hi All,

I have defined Height and Width in the Item Master, I need to have a pop-up in sales order while selecting this item asking me total vertical units and total horizontal units (one item is 1mx1m) so if I enter 4 vertical and 8 horizontal units in the pop-up the Qty field should auto populate with 12 units.

Help desired.

BR

Siddiq

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Muhammed

Do all items have these properties? If so, I would suggest adding 2 User defined fields on the row and putting a query and formatted search on the quantity field. If not, then add 3 fields as follows:

Field 1 = UseFields (Set as Mandatory and add a Y and an N in the valid values table with default set to N)

Field 2 = LengthQty

Field 3 = WidthQty

Then set your query with a SELECT CASE WHEN U_UseFields = 'Y' THEN U_LengthQty * U_WidthQty ELSE 1 END

This will set the quantity to 1 if UseFields is N or use the calculation if Y. You can then change the quantity manually if the calculation is not used. set the formatted search to refresh when exiting the width column if this is the last column that is updated. Your field order should be something like this:

ItemCode

ItemDesc

U_UseFields

U_LengthQty

U_WidthQty

Quantity

Let me know if you need further assistance with this.

Kind regards

Peter Juby

Answers (1)

Answers (1)

Former Member
0 Kudos

If you need pop up, it can only be done through SDK. Please post it on SDK forum. Do you need those values save to somewhere?

Thanks,

Gordon

Former Member
0 Kudos

If saved somewhere on the form I dont have an Issue. But I want the qty to be calculated based on the asked inputs.

Regards,

Siddiq

Former Member
0 Kudos

In this case, a calculator in 2007 version can do the job easily. I think you may not need to use SDK for popup..