Question

Photo of Dillan Cagnetta

0

Merge Documents on Group Member Attributes

Hi everyone

In the documentation it says 

  • Should you need access to the group member data (e.g. group member attributes) you can use the GroupMember property on the person like: {{ Row.GroupMember | Attribute:'attributekey' }}

So i added this to the example given early to test out.

{{ row.GroupMember | Attribute:'Assignment1Score' }

but it doesnt return anything at all.

Person doesnt have a GroupMember  but a  Members  property 

Thanks

Edit: screenshots

Yes my group type has the member attributes:

attributes.png

My merge template in html (only showing lava):

{% for row in Rows %}
                    <div class="col-xs-6 clearfix" style="margin-bottom: 24px; min-height: 200px;">
                        <div class="pull-left" style="margin-right: 24px; width:20%;">
                            <img src="{{ 'Global' | Attribute:'PublicApplicationRoot' }}{{ row.PhotoUrl }}" style="width: 100%; border-radius: 100px;" />
                        </div>
                        <div class="pull-left">
                            <h1>{{ row.FullName }}</h1>
                            {{ row.Email }} <br />
                            {% for phone in row.PhoneNumbers %}
                                {{ phone.NumberFormatted }} <small>{{ phone.NumberTypeValue.Value }}</small> <br />
                            {% endfor %}                           
                            {{ row.GroupMember | Attribute:'Assignment1Score' }}                       
                        </div>
                    </div>
                {% endfor %}

i go to the group and in the list of group members i click the merge template button but this is what i get

 

  • Photo of Nick Airdo

    0

    That note implies you're using a Merge Template against a list of group members.  So...

    • If you have a group that has a Member Attribute with a key of "Assignment1Score"
    • And you have a merge template with this Lava in it: {{ row.GroupMember | Attribute:'Assignment1Score' }}
    • And, while looking at that group and the list of its members, if you click on the merge template button then choose your merge template...

    The resulting document should include the "Assignment1Score" values for the group's members.

    • Dillan Cagnetta

      Hey Nick, thanks for the reply. Yes im doing it against a group with the group member attribute defined. I added some screenshots to my original question for more detail.

    • Nick Airdo

      Ok, perfect. Thanks for the screenshots it really helps. Anyhow I see Ted's Assignment1Score (85 shown right underneath his phone numbers) on your output screenshot. What were you expecting? (Perhaps I don't understand your original issue.) I just tested this using the template you posted and it's working fine for me too.

    • Dillan Cagnetta

      Yeah the screenshot is of Teds Member Detail block. It's when I do a Merge Document with the lava post to include Assignment Scores that is doesn't display (i.e the last screen shot)