workflow to get the value of Lookup field

In Visual Studio 2008.

I was trying to get the value of Lookup field in a Document Library and would see a result like this:

sLookup = workflowProperties.Item(“FieldName”).ToString

but it returns: 9;#FieldValue

This is how I went about fixing the string (if there is a better way, please tell me!)

sLookup = Right(workflowProperties.Item(“FieldName”).ToString, Len(workflowProperties.Item(“FieldName”).ToString) – InStr(workflowProperties.Item(“FieldName”).ToString, “#”))

Leave a Reply

Your email address will not be published. Required fields are marked *