I suspect the issue is that you are returning a string attribute from the calculation, but the user attribute is not a string object, and so there is a type mismatch.
Have you turned trace logging on, which would confirm if this is the issue or not? See http://community.landesk.com/support/docs/DOC-6413 for details how to do this if you are not sure.
Thanks for your Hint.
After debugging it I searched for the error in the community.
It finally brought me to the following topic that then solved my problem!