3

I've created a simple workflow to send a notification email to the "Created By" user which works nicely.

What I wanted to do is use the "Assigned To" built-in lookup instead, which is a "People & Group" type column that is linked to AD. When I did this, I updated the item's column with a user but now I see this error in the workflow: "Coercion Failed: Input cannot be null for this coercion."

As you can see below, there is definitely users assigned but for some reason sharepoint see it as null.

enter image description here

enter image description here

enter image description here

Your help is appreciated.

5
  • Have not come across this, if you set the data source to "Current Task" and get "Assigned To" from there do you get an error? (assuming your trying to email the person the person a task was assigned to) Commented Jan 15, 2014 at 1:25
  • 1
    Try changing the Return field as from Email Address to Display name and see if it works
    – MdMazzotti
    Commented Jan 15, 2014 at 13:33
  • Ryan, that's pretty much what I have set, but I get the same error: Coercion Failed: Input cannot be null for this coercion.
    – Humble Val
    Commented Jan 15, 2014 at 14:53
  • @MdMazzotti I get the same error if I set anything else but string.
    – Humble Val
    Commented Jan 15, 2014 at 14:53
  • I did notice something since there are two content types for discussion board type list, there are two "Assigned To" columns for each, perhaps it's pulling from the wrong list... not sure if that even makes sense.
    – Humble Val
    Commented Jan 15, 2014 at 17:16

2 Answers 2

2

I figured it out!

There were two problems:

  1. The "Assigned To" was set to "People & Groups", switched it to just "People only".
  2. The "Assigned To" field was being pulled from the "current item", which is the reply itself. Naturally it has no meta data set and would be empty.

So what I did was pull the "Assigned To" info from the "parent" item which is the initial post, by linking to it using "if ID = Parent ID" type of equation.

enter image description here

I'mma go faint now.

1

You could use multiple steps in your workflow. The first step you could check to see if your current item field is empty. If it is empty then set a workflow variable to a empty string.

So workflow variable would be Assigned. If the current item.assigned is empty set it to an empty string" ". If it contains a value then simply assign the workflow variable assigned to the current item value.

Then in the second step simply reference the workflow variable when setting up your email and you guarantee the value to never be a null referenced field.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.