0 votes
in Rock by TinaStephens (8.6k points)
edited

This workflow for Sun Valley https://rock.sv.cc/page/136?WorkflowTypeId=208 under the Activity of "Send Text" and the Action of "Set Text Message Contents (to Parent)" I have the lava to show Him or Her in place of Them. It works in the lava tester but not live.

I can see this if I go to the connection and test on Tessa Amarillas, the text to the parent does not replace them with him or her.

enter image description here

1 Answer

0 votes
by KateQuinn (6.8k points)
edited
 
Best answer

In the original lava, using 'Person' throughout the code grabs the gender from the current person who is logged in, which is why it worked correctly for Tina when she was logged in. Here is the original lava:

{% assign campus = Workflow | Attribute:'Campus','Object' %}
{% assign pastor = Workflow | Attribute:'DefaultConnector','Object' %}
{% assign student = Workflow | Attribute:'Person','NickName' %}

Hi {{ Workflow | Attribute:'Parent','NickName' }}! I heard that {{ Workflow | Attribute:'Person','NickName' }} said Yes to Jesus and I’m so excited for {% if Person.Gender == 1 %}him{% elseif Person.Gender == 2 %}her{% else %}them{% endif %}! I’d love to give {{ Workflow | Attribute:'Person','NickName' }} a free Bible and connect with {% if Person.Gender == 1 %}him{% elseif Person.Gender == 2 %}her{% else %}them{% endif %} on {% if Person.Gender == 1 %}his{% elseif Person.Gender == 2 %}her{% else %}them{% endif %} next steps in following Jesus the next time {% if Person.Gender == 1 %}he{% elseif Person.Gender == 2 %}she{% else %}them{% endif %} is on campus. If you have any questions feel free to reply to this message. I hope to see you soon!  {{ pastor.NickName }} {{ pastor.LastName }}, Student Pastor

I changed it slightly to get the person object on line 3, and then used that object to reference the student throughout:

{% assign campus = Workflow | Attribute:'Campus','Object' %}
{% assign pastor = Workflow | Attribute:'DefaultConnector','Object' %}
{% assign student = Workflow | Attribute:'Person','NickName' %}


Hi {{ Workflow | Attribute:'Parent','NickName' }}! I heard that {{ student.NickName }} said Yes to Jesus and I’m so excited for {% if student.Gender == 1 %}him{% elseif student.Gender == 2 %}her{% else %}them{% endif %}! I’d love to give {{ student.NickName }} a free Bible and connect with {% if student.Gender == 1 %}him{% elseif student.Gender == 2 %}her{% else %}them{% endif %} on {% if student.Gender == 1 %}his{% elseif student.Gender == 2 %}her{% else %}them{% endif %} next steps in following Jesus the next time {% if student.Gender == 1 %}he{% elseif student.Gender == 2 %}she{% else %}them{% endif %} is on campus. If you have any questions feel free to reply to this message. I hope to see you soon!  {{ pastor.NickName }} {{ pastor.LastName }}, Student Pastor

This one gets the gender correctly from the 'student'.

Welcome! Here you can ask questions and receive answers (hopefully) from other members of our team.
...