MSSQL Lookup in Calculation
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"
Else
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.
thanks.
I then want to use this field in a calculation:
If L_ITEMTYPE = "3" Then
Return "Kit"
Else
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.
thanks.
Answers
Best Answer
Alicias,
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.
Lorren
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.
Lorren