This issue is really getting on my nerves because it makes no sense at all!!!!! I am using Nintex Workflow and SharePoint 2013. This should be a simple thing but as always simple things never turn out simple.
I have some columns in a list that are copied to a list in another site based on certain circumstances. One of those columns is a lookup. It worked fine. Well I needed another lookup column copied to that same list in the other site. This should be simple because it is currently working I just need this other one to do the same thing. Now in the source list it is a lookup and the target list is a string/text. Again, there is no problem with the one lookup. When I try to make the other column do the same thing it doesn't work. I get an error message that says something "Coercion Failed: Unable to transform the input lookup data into the requested type". Keep in mind, it wasn't doing it with the other lookup and I have it working the same way. I even have it doing it the same way in the "Create item in another site" action. I even went to another area where I play and test things. I made a lookup value copy to a text/string in another list - no error!!!! Someone please tell me what's wrong with this thing before I get a sledge hammer!!! 😮
Solved! Go to Solution.
Are you saving the value of the lookup column in a variable or directly saving it to the other list? What action are you using to save to other list in another site? Is it possible that the value being passed is the ID of the lookup field and not the text itself?
If you set this value to a variable, do something like this:
Set Variable = varText, Equals List Lookup, Source: Current Item, Field: <your lookup field>, click on ..., Lookup value (as text)
Did you already use the sledge hammer?
Just as the previous code was retrieving the value from the lookup and passing it that was all I did. I did not save it to a variable. "Create item in another site" was the action I used. I even created a string variable and saved it there before copying it. I used a string builder before copying it just to make sure. It didn't work regardless of the method. I got the same error. I even did a log history to check the value and it came up as a string not a ID/number.
Good News: I was able to replicate your issue.
Better News: It worked for me by saving the lookup value to a "Single line text" variable as Lookup value (as Text) and then using this variable in the "Create item in another site" action.
You mentioned that you have already tried this way correct?
SEEEEEEEEE.....I knew I wasn't crazy! I just don't understand why the other lookup works. I didn't use a 'Set Variable' action. I simply put it in the 'Create Item In Another Site' action and selected the variable. What do you mean by 'DocsCodes - Lookup Value (as Text)'?