Question

Photo of Jeff Surcess

0

How to assign current person to a workflow attribute (of person type)

Hi,

I am trying to assign the currently logged in person to a workflow attribute of Person type but the below (and several other attempts) doesn't work.

What lava should go in the Text Value field to represent the Person interacting with the form?

pastorAssignment.png

Thanks,

Jeff Surcess

  • Photo of Tiffany Bunney

    0

    Instead of using the action Attribute Set Value, use Attribute Set to Current Person, and then choose the attribute you want set to the current person.

  • Photo of David Axelson

    2

    Hi Jeff!

    Tiffany's answer is the easiest approach, but it might help to understand why the approach you took didn't work. Workflows don't store any actual entities as attributes. Each entity type is stored differently, which makes this list a helpful resource.

    Person entities are actually stored as a PersonAlias Guid. This is not super intuitive and catches a lot of people when they first start using workflows. The PersonAlias is basically used so things don't break if a Person gets merged. So, you could replace {{ CurrentPerson }} with {{ CurrentPerson.PrimaryAlias.Guid }}, which will return a PersonAlias Guid that is guaranteed to be attached to that Person. Or, you could do it the easy way with the Set to Current Person action :)

  • Photo of Jeff Surcess

    0

    Thanks Tiffany and also David for the bg info.

    David I was hunting around for the right alias token to put in there and wasn't able to find it in the documentation although I did suspect that I could put an alias in there.

    Cheers,

    Jeff Surcess