Skip to main content

I have a workflow designed to copy metadata from one file to another in the same list.  We write documents in Word, but publish them as PDFs and the workflow is designed so that we don't have to manually re-enter all that data a second time.

Everything works fine, except for the data in a Choice column we have.  It allows for multiple selections. If I use the default setting, which copies it as a string, no data copies over.

If I use the other option, Choices, Comma Delimited, the workflow errors out and I get this error:

Coercion Failed: Input cannot be null for this coercion.

Update Item Choice Columns problem

I received the error once before while copying over data from a people-picker field where choices are delimited by semi-colons.  In that instance, I found that copying the data as a string would solve the problem and now that data copies successfully.

What gives with the Comma-delimited columns not copying?  This workflow automates a lot for us and will save us steps, but it has this one tiny hiccup I can't seem to make go away.

Any help would be appreciated.

Thanks,

‌ Is your workflow on-premises or in Office 365 (SharePoint Online)?


Hi Patrick,

The workflow is on premises. We use SharePoint 2013, and not 365.


Hello Rae Ann Rockhill‌,

I've put together a quick test-case in my SP2013 environment. Using a Choice Column (configured for multi-select as checkboxes), I have been able to use the update item action to update another item in the list using the default configuration (As String).

If you take a look at the below screenshot, I am taking the value from rVendor] when items are created and updating the item with ID = 1 to match:

If you write the contents of your choice control to the log, what do you see?

Off hand, the only thing I could see that would cause you to encounter null exception errors would be based on the choice options (special characters, copy/paste carryover, etc.).

Frank Field‌ can threads be moved? This should really be in the  area as opposed to NWC. wink.png


Hi Patrick,

Thanks. Now I’m going to show my lack of skills, hehe. How do I write the contents of the column to the log? I’ve been told to use the Log to History List command before, but I don’t quite get what’s being logged (or how to specify what to log) or where to view it afterwards.

I should mention that the Vendor column is optional, not all documents use it because it doesn’t always apply. Could that affect the results?

Thanks,

Rae Ann


Hello Rae Ann Rockhill – I've checked the behavior with an empty mVendor] without error, so I don't think that's the issue here.

Lets setup a "Log to History List" action, that will be extremely helpful in troubleshooting your workflow. Once you add the action to your workflow, you can use the "Insert Reference" button to inject your Vendor value into the log:

You can find and double-click your Vendor value with Item Properties

Now once you've republished the workflow and ran your workflow, follow the following steps to see your log entry:

  1. Using the ellipses menu on your list item – select Workflows

  2. Click on your most recent workflow (it may be completed or in-progress at this point).
  3. You'll then see your log to history entries in the Workflow History

If you have any trouble viewing your workflow history, this should help :  


So I did that:

Inserted a Log to History file, republished the workflow, ran it on a file with choices selected in the Vendor column. No Bueno.

Here’s what I got:

Here’s the metadata for that file:

Thoughts?


Rae Ann Rockhill‌ When you look at your SharePoint list, do you see values populated correctly (i.e. AFC, ASR, etc.)  for the Vendor column? If your workflow isn't retrieving a value for this field, it makes me think your choice control may not be connected properly.


Interesting! That column wasn’t showing for the view, so I added it. And the column has values for one document, but not others (and yet, if you look at the form, those others have values in that Vendor field.) Might it have somehow been disconnected from the field in the form and so data entered on the form is not making its way to the column?

I’m going to test my copy metadata workflow on the file that shows data in the column…. And Data copies over to the PDF successfully. So it sounds like somehow that field is not connected properly in the form, yes?


‌ Right – that looks to be the issue! I'd open up the form's choice control to see what column it's connected too currently (if at all). wink.png


Thanks! I think I disconnected the field to re-arrange how the choices appear because you can’t those options while it’s connected. And I must not have reconnected the field to that box on the form after.

Sheesh! Thank you!!


No problem – glad we got it working for you!


Yes sir – reconnecting the choice control within Nintex Forms ended up resolving ‌ issue!


Thanks!


Done. Frank.  Patrick, thanks again!


Reply