+1 vote
in Rock by TinaStephens (8.6k points)
edited

I added column to the Sun Valley Communication History. Right now it's showing who the email was sent from with this lava in the added column:

{{ Row.Sender.Email }}

I need it to show the "From" email address that was set on the template. Would that be "FromEmail" ? I haven't been able to get it to work.

2 Answers

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

I would try wrapping in {% raw %}{% endraw %} tags. (wrong)

------------------------------------------------------------------------------------

I should have read the question better: Mark was closer than I was. The Communication List block does not give us a communication object, but it does give us the Id of the communication (as Row.Id )

enter image description here

Using that Id we can write an entity command that grabs what we want like this:

{% communication id:'{{ Row.Id }}' %}
    {{ communication.FromEmail }}
{% endcommunication %}

---------------------------------------------------------------------

{% to get the sms information as well: %}
{% assign info = '' %} 
{% communication id:'{{ Row.Id }}' %}
    {% assign email = communication.FromEmail %}
    {% if email != empty %}
        {% assign info = info | Append:email %}
    {% endif %}
    
    {% assign num = communication.SMSFromDefinedValue.Description %}
    {% if num != empty %}
        {% assign info = info | Append:num %}
    {% endif %}
{% endcommunication %}

{{ info }}
0 votes
by MarkLee (8.3k points)
edited

The entity for each "Row" is Communication I think. So the sender is the person who sent the email. If you want what the address the email came from I think that {{Row.FromEmail }} should work. If you want just the info in the template you should try {{ Row.CommunicationTemplate.FromEmail }}, but that might include some lava and wouldn't be what the person received.

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