Question

Photo of Matthew Meekins

0

Workflow "Set Attribute Value" Action for Phone Number

I'm creating a form for church members to fill out on the website and one of the fields I have is Phone Number. I want to keep that field, but I also want it to pull in the person's phone number if they are logged in. I've tried many different Liquid tags ,but I can't get anything to pull in the phone number on this form. Any suggestions?

  • Photo of Jeremy Turgeon

    0

    Hey Matthew,

    Here's something that might work for you.  Create a workflow attribute of Phone and set its field type to Text.  Then, add a Set Attribute Value action before the user entry form.  Set its Attribute to the Phone workflow attribute from before and enter the following in the text section.

    {% for PhoneNumber in CurrentPerson.PhoneNumbers %}
    {{PhoneNumber.Number }}
    {% endfor %}

    This should enter the current user's phone number into the Phone text field.  Unfortunately, if the person has more than one phone number it enters them all.  I couldn't find any documentation on how to limit it to a specific phone type.

    User Phone Number.PNG

    Hope that helps!

    • Trey Hendon III

      Great point Jeremy! Might be worth adding a Phone filter request to the Black Book. I see that Person has a filter type for Address, it'd be a great addition to see that for phone (and email) including a "primary" flag.