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

NW2010 create item failure

I have a workflow which has, as the final step, a Create New List Item control, which fails, causing a fatal error, about 95% of the time. The error message is Coercion Failed: Unable to transform the input lookup data into the requested type. The purpose of this Create Item task, is to record the approval history, so that when the workflow activity purges from the list item, the approval history can be easily read from a Multiple lines of text (MLT) list column, rather than going to the workflow history list, and finding the associated line items with the item ID.  In my create item control, I am including the Title from the context item, the Item ID from the context item, and the All Approvers' Comments from the Workflow Context data.  I am certain that the point of failure is the All Approvers' Comments, writing to the MLT field.  The MLT field set up is in attached image, although I have attempted to change the type of text to Plain Text, and still have the failure.

I have another workflow, which is running against a library, as opposed to a list, in which I update an MLT column on the item, against which, the workflow is running, with the All Approvers' Comments, and which consistently works without failure.  But the Multiple Lines of Text setup options are different for Document Libraries and Lists, so I can’t determine why the one in the document library works consistently, without failure, while the one in the List fails fairly consistently.

As a side note, I went to the separate approval list, because I attempted to update the All Approvers' comments in a MLT field on my context list item, but it failed every time, (with this error: The workflow could not update the item, possibly because one or more columns for the item require a different type of information), where the create new item action worked for a while.

  Would appreciate any assistance.

Labels: (1)
0 Kudos
Reply
5 Replies
Nintex Employee
Nintex Employee

Re: NW2010 create item failure

Hello Ellen Farley​ -

My understanding is that after an approval (or rejection?) that you are attempting to create a new item in a different list with the comments from the task item, along with the current item's ID and title, correct?

Not sure how you have it setup, but I was able to mock something up that takes the task approval comments and the item's title and ID and creates a new item in another list:

Main list (where the workflow resides and runs):

Resulting task dump list after approval:

Let me know if you are still getting errors.

Hope this helps!

0 Kudos
Reply
efarley
Nintex Newbie

Re: NW2010 create item failure

How is your Approvals field setup?  Is it single line of text or multiple line of text?  I have no issue when populating single line of text field with all approver comments, but I am using lazy approval on the workflow, with 7 approval tasks, so the character count is well in excess of 250 characters.

0 Kudos
Reply
Nintex Employee
Nintex Employee

Re: NW2010 create item failure

The Approver Comments is a Multiple Line Text field:

One the task form itself, the comments are using a Multi Line Textbox (by default).

You should be able to use the All Approver Comments to populate the item as it will grab all of the comments from all of the task associated with the item.

Like so (Task approval 1 and 2 are the exact same, just saving space):

Result:

I am not sure if Lazy Approval is cause some unseen issues, but I will test that out a bit later tonight if I get some time

Hope this helps!

Reply
efarley
Nintex Newbie

Re: NW2010 create item failure

Wondering if you had an opportunity to test on your system with lazy approval.  I am thinking that if it works for you, then, there must be some technical issue with my SharePoint farm or my Nintex install, because mine ends in error every time.

0 Kudos
Reply
Nintex Employee
Nintex Employee

Re: NW2010 create item failure

Hello Ellen Farley​ -

I was able to do some testing and this is what I found.

I modified the workflow a bit to capture each task comments (as you said there are multiple approval steps) rather than All Approver Comments:

This allows all comments to be added to a single variable and then upon update, we only have to use one variable.

Here is the resulting list update:

The one issue that I have with this is that I cannot get the list to properly insert the new line between each comment. However, if you output the comment variable to a notification, you get this:

Also, if you are using lazy approval, ANYTHING after the approve/reject line is considered part of the comments. This means that if a user hits reply and does not remove the original text, it will be brought in. Also, if the user has a signature line that they use, that will come in as well. I got in the habit of removing all text and then replying with approve/reject and then my comments.

Hope this helps!

0 Kudos
Reply