Skip to Content

FMS is returning correct value ,but unable to use tab or move to next field in SQ

Dear Experts

I had created a UDF in SQ, in the name of Item cost for SQ,

what is my requirement is the the user select an item and a whs, the specified item's - Item cost (Moving average cost) should auto populate in the UDF.

for that i had created a FMS also, its giving me the value correctly as per my requirement,

but am facing an issue, once the UDF is update then am not able to move forward using tab or even mouse, it pop up an error 'Invalid numeric value (ODBC -1030) [131-183]'

Pls help me to Solve this issue

Regards

SELECT T0.[AvgPrice] FROM OITW T0 where T0.[ItemCode] =$[$38.1.0] and T0.WhsCode =$[QUT1.WhsCode.MN-WH]
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    Dec 18, 2017 at 09:48 AM

    Hi,

    Try no to mix variables. Easiest is to always use the table.field syntax. Please try this:

    SELECT T0.[AvgPrice] FROM OITW T0 where T0.[ItemCode]=$[QUT1.ItemCode]and T0.WhsCode =$[QUT1.WhsCode]

    Regards,

    Johan

    Add comment
    10|10000 characters needed characters exceeded

    • Hi,

      The UDF type should be Units & Totals > Price. Also, come to think of it, there may be a chance of the query returning a null value.

      Please correct the UDF data type, and try this query:

      SELECT ISNULL(T0.[AvgPrice], 0) 
      FROM OITW T0
      WHERE T0.[ItemCode] = $[QUT1.ItemCode]
        and T0.[WhsCode] = $[QUT1.WhsCode]

      Regards,

      Johan