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.
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.
Solved! Go to Solution.
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 [Vendor] 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.
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?
Hello Rae Ann Rockhill – I've checked the behavior with an empty [Vendor] 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:
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:
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?