Skip to content


MSSQL Lookup in Calculation

Alicias asked 8 years ago
Is it possible to use an MSSQL lookup field in a calculation? For example, I have created a MSSQL Lookup field called: L_ITEMTYPE that retrieves the item type of an inventory item.
I then want to use this field in a calculation:
If L_ITEMTYPE = "3" Then
Return "Kit"
Return "Item"
End If

but this gives me an error when I validate it: '_L_ITEMTYPE' is not declared. It may be in accessible due to its protection level.

If I directly map to the MSSQL lookup field and map it to a comment field, for example, it displays the correct value, so I know the lookup is working – I just can't seem to be able to use it in a calculation.

Best Answer
lorren answered 8 years ago

The current SmartConnect release does not allow for using an MSSQL Lookup return value in another calculation.  The work around would be to use a Calculated field written with .NET code to get the value from SQL and use it in your calculation.

This is being looked at for a future release.


If you would like to submit an answer or comment, please sign in to the eOne portal.