cancel
Showing results for 
Search instead for 
Did you mean: 
thecarpe
Nintex Newbie

Coersion Failure Revisited - Unable to transform the input lookup data into the requested type

Jump to solution

The previous question on this was assumed answered, but it actually wasn't answered.  I'm going to re-open the discussion.  Here is an overview of the issue as it exists in my context.

Setting: 2 lists. List A has a lookup column that references List B (Menu Item) and pulls in an additional field (Cost).  The List A shows it as Menu Item:Cost.  In both lists, the value is a number.

Workflow (list A - a meal scheduling list): Take the lookup in List B:Cost (which is a number that is the cost of a menu item - list B is just a plain menu, unit cost, vendor list), and convert it into a variable, which is also a number. Call it "Cost" (this is where the error occurs - tried to directly use the number, tried to create a variable, tried to use it as currency, tried to use it as a single line of text...same result: coersion failed). Multiply "Cost" by number of people in the meeting, store that value in variable "subtotal", update subtotal field with variable, etc, etc, with tax and total cost.

The problem is that the lookup (which has successfully worked for me in the past) cannot seem to take the additional field data (which is a number in this case) and make any sense of it in the destination list.  Seems so simple, but 28 errors later, I'm scratching my head - corrupted list?

Labels: (1)
0 Kudos
Reply
3 Replies
Automation Master
Automation Master

Re: Coersion Failure Revisited - Unable to transform the input lookup data into the requested type

Jump to solution

Hi Chris,

not sure if i understand your issue but if you want to fill in a lookup field via workflow, you only have to update your list a item with the ID of the list b item you want to lookup. All additional information about that list b item which is displayed in your list a should be fetched automatically by sharepoint.

Regards

Philipp

0 Kudos
Reply
thecarpe
Nintex Newbie

Re: Coersion Failure Revisited - Unable to transform the input lookup data into the requested type

Jump to solution

Not exactly, Philipp, but thanks for the reply.  What I found yesterday was the when I pull over a field that is a number from one list to another via a lookup, to be able to do anything with it, I need to have a workflow convert that number into a single line of text and store it in a variable.  For whatever reason, it seems to hit that coersion error until it is converted to text rather than a number (which is counter-intuitive, to say the least).  This did fix it and I validated it in multiple contexts.

To summarize: lookup field in list A grabs item in list B. I also have it grab one additional column that is a number (meal, and mealSmiley Tonguerice).  To get it to do the math for subtotal, tax, and total cost in list A, I need to store the value for mealSmiley Tonguerice as a single line of text variable in my workflow (as opposed to trying to leave it as a number).  If I don't, the coersion failure happens.  If I do, the SLT behaves just fine masquerading as a number.    

View solution in original post

0 Kudos
Reply
Not applicable

Re: Coersion Failure Revisited - Unable to transform the input lookup data into the requested type

Jump to solution

I want to set workflow variable equal to a looked up column but still get Coersion Failure.

A list: cost, department

B list: department, cost center

A list.department is lookup column

I want to set str_department = department in A list but I got Coersion Failure.

do you know how to solve this?  below is screenshot of set variable action setting.

0 Kudos
Reply