0

I'm trying to update a List Item column based on the a Current Task's Assigned To value. However, following code doesn't work for me:

If Current Task:Assigned To contains Car
  Update Item in Current Item
Else
  Log assigned with [%Current Task:Assigned To%] to the workflow history list

Any idea why it is not working? It is always logging the "assigned with ..." to the workflow history and I'm 100% sure the value contains "Car". I tried with equals and all, but also that didn't work out.

Kindly advice.

  • Aron's answer is probably going to be your best bet, try outputting that value to see what it says. Most likely it is seeing a domain\username or the users site collection ID instead of their name with might contain the Car value. So depending on what the lookup is bringing back, you may need to build in some other logic to pull the proper field so you can evaluate it properly. – Eric Alexander Oct 14 '13 at 17:55
  • In this case Kris, if the SPDesigner workflow condition isn't working correctly at all, I would have to agree with Aron on this one, and shouldn't be because of a locked task. Sorry I misinterpreted the question. – Mike Nov 11 '13 at 23:12
1

I'm going to respectfully disagree with Mike's answer. Starting workflows with a 1 minute pause is good practice, but the symptoms are different than what you're experiencing here: if your workflow randomly throws errors about not being able to update an item because it requires a different content type, you need to add that 1 minute pause.

In this case, where the "if" condition is never resolving as true but the workflow is progressing without an error otherwise, the most likely culprit would be at Current Task:Assigned To. One huge annoyance about workflows, sharepoint designer, and sharepoint in general is that it'll often display things differently than they're seen on the backend. Perhaps it's using usernames or display names, where "Car" is in one but not the other. Try setting a workflow variable to Current Task:Assigned To, then logging the value, then testing the variable against "Car". That'll at least progress your troubleshooting. Alternatively, do it before entering the approval workflow: set the value in Current Item to whatever you're using to pick "Assigned To" for the approval workflow.

0

In my experience, it's best to pause the workflow (1 min is fine) if you are trying to update a list item from a task. The task may be locked for editing by SharePoint or otherwise, which is usually the reason.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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