+1 vote
in Rock by MarissaEubanks (4.0k points)
edited

Client: Compass Christian

Asana Task: https://app.asana.com/0/1203373882677787/1203886683934679/f

Workflow: https://rock.compass.church/page/136?WorkflowTypeId=192

I can't seem to figure out how to successfully save the Campus that is entered by the person completing the form to their profile/family. I've done this before but, this workflow as inherited and was/is already using the 'Attribute Values Set' workflow action that looks custom to a BEMA plug in of some sort - see below. I've never used this, and am wondering if this is where I'm getting stuck?

Everything else is working as expected, and this is not an emergency - just driving me CRAZY!

enter image description here

1 Answer

+1 vote
by DavidTurner (14.9k points)
edited

Campus is a field on the person's family group, so I typically write query to get person's primary family and then update the campus property on that group. Not sure if it's the best way, but...

enter image description here

Here's the SQL from that screenshot...

{% sql %}
    SELECT TOP 1 G.[Guid] 
    FROM [PersonAlias] PA
    INNER JOIN [GroupMember] GM ON GM.[PersonId] = PA.[PersonId]
    INNER JOIN [Group] G ON G.[Id] = GM.[GroupId] AND G.[GroupTypeId] = 10 
    WHERE PA.[Guid] = '{{ Workflow | Attribute:'Person','RawValue' }}'
    ORDER BY ISNULL(GM.[GroupOrder], 99999) 
{% endsql %}
{% for item in results %}
    {{ item.Guid }}
{% endfor %}
Welcome! Here you can ask questions and receive answers (hopefully) from other members of our team.
...