Share via


How to Update a Resource's Reference Attribute with just a Function Evaluator

I figured out something very simply yet no know with whom I consulted knew how to do: How does one update a resource object's attribute if it is a reference type with just out-of-the-box (OOB) functionality?

For instance, say that you wanted that whenever an owner of a group was deleted from AD that it would be replaced with a default value (i.e. say for self-service sake).

One could create a Transition-In MPR that whenever a resource enters that set (e.g. an ownerless group), that would trigger an action workflow, that would contain a custom activity that you could write -- or calls an UpdateResource activity from the Workflow Activity Library (WAL) that Microsoft Consultant Services provided you -- but wouldn't it be nice if you could just use the out-of-the-box Function Evaluator? Well, I figured out how you can.

In order to populate the reference attribute, create the workflow with a Function Evaluator activity that points to the desired reference attribute (e.g. [//Target/Owner]); then, for its value, add a String that simply contains the Resource ID of the desired resource (e..g e05d1f1c-3d5e-4014-baa6 -- without the single quotes!) and wallah. That is literally all there is to it.