Ministry Teams Roster built from Custom Field
Imports: 2

This report was sponsored by New Life Church in Miramar Beach, FL. They needed a report that gave a list of their ministry teams built off of a Custom Tab called Serving. The serving tab consisted of fields with Ministry name and then multiple choice answers. Serving: Ministry Name: ☐ Deacon ☐ Leader ☐ Assistant Leader ☐ Volunteer The resulting report is this format: Ministry Name Deacons Responsible: (First/Last Name) Leader: (First/Last Name) Assistant Leader(s): (First/Last Name) (First/Last Name) Volunteers: (First/Last Name) (First/Last Name) (First/Last Name) (First/Last Name) (First/Last Name) (First/Last Name) -------------------------------------- Next Ministry Name Deacons Responsible: (First/Last Name) Leader: (First/Last Name) Assistant Leader(s): (First/Last Name) (First/Last Name) Volunteers: (First/Last Name) (First/Last Name) (First/Last Name) (First/Last Name) (First/Last Name) (First/Last Name)

Preview

Report Preview


  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
<html lang="en">
<head>
    <meta charset="utf-8">
    {{ helpers.bootstrap_3 }}
    <!-- This report is styled using the Bootstrap framework. http://getbootstrap.com/css/
				 If you'd rather provide your own styles, add them to the style section below. -->

    <style>
        @page {
            margin: .125in;
        }

        /*-- PDF margin reset --*/

        tr.person > td {
            padding: 0.25em;
        }

        tr:nth-child(even) {
            background-color: #edf2f7 !important;
        }

        thead {
            border-bottom: 1px solid #bec9d3;
        }

        th {
            padding: .5em;
        }

        .avatar {
            width: 50px;
            height: 50px;
            border-radius: 25px 25px 25px 25px;
            -moz-border-radius: 25px 25px 25px 25px;
            -webkit-border-radius: 25px 25px 25px 25px;
        }

        .container {
            width: 100%;
            padding-top: 15px;
        }

        .ministry-item {
            page-break-inside: avoid;
        }
    </style>
</head>
<body>
<div class="container">
    <div class="clearfix"></div>

    {% for tab in organization.tabs %}
        {% if tab.name == 'Serving' %}
            {% for ministry in tab.fields %}
                <div>
                    <h2>
                        {{ ministry.name }}
                        <br>
                        <small>
                            {{ organization.name }}
                        </small>
                    </h2>
                    <hr>

                    {% assign deacons = '' %}
                    {% assign leaders = '' %}
                    {% assign assistant_leaders = '' %}
                    {% assign volunteers = '' %}
                    {% for person in people %}
                        {% for p_tab in person.tabs %}
                            {% if p_tab.name == 'Serving' %}
                                {% for field in p_tab.fields %}
                                    {% if field.name == ministry.name %}
                  										{% for field_result in field.value | split: ',' %}
                                        {% if field_result contains 'Deacon' %}
                                            {% assign deacons = deacons | append: person.name | append: ',' %}
                                        {% endif %}
                                        {% if field_result contains 'Leader' %}
                                            {% assign leaders = leaders | append: person.name | append: ',' %}
                                        {% endif %}
                                        {% if field_result contains 'Assistant Leader' %}
                                            {% assign assistant_leaders = assistant_leaders | append: person.name | append: ',' %}
                                        {% endif %}
                                        {% if field_result contains 'Volunteer' %}
                                            {% assign volunteers = volunteers | append: person.name | append: ',' %}
                                        {% endif %}
                  										{% endfor %}
                                        {% break %}
                                    {% endif %}
                                {% endfor %}
                                {% break %}
                            {% endif %}
                        {% endfor %}
                    {% endfor %}
                    <h4>
                        Deacons Responsible:</h4>
                    {% assign deacons = deacons | split: ',' %}
                    <ul>
                        {% if deacons.size > 0 %}
                            {% for deacon in deacons %}
                                <li>{{ deacon }}</li>
                            {% endfor %}
                        {% else %}
                            <li>None</li>
                        {% endif %}
                    </ul>
                    <h4>
                        Leader:</h4>
                    {% assign leaders = leaders | split: ',' %}
                    <ul>
                        {% if leaders.size > 0 %}
                            {% for leader in leaders %}
                                <li>{{ leader }}</li>
                            {% endfor %}
                        {% else %}
                            <li>None</li>
                        {% endif %}
                    </ul>

                    <h4>Assistant Leader(s):</h4>
                    {% assign assistant_leaders = assistant_leaders | split: ',' %}
                    <ul class="list row">
                        {% if assistant_leaders.size > 0 %}
                            {% for assistant_leader in assistant_leaders %}

                                <li class="col-xs-6">{{ assistant_leader }}</li>
                            {% endfor %}
                        {% else %}
                            <li>None</li>
                        {% endif %}
                    </ul>

                    <h4>Volunteers:</h4>
                    {% assign volunteers = volunteers | split: ',' %}
                    <ul class="list row">
                        {% if volunteers.size > 0 %}
                            {% for volunteer in volunteers %}
                                <li class="col-xs-6">{{ volunteer }}</li>

                            {% endfor %}
                        {% else %}
                            <li>None</li>
                        {% endif %}
                    </ul>
                </div>
                <p style="page-break-after: always;">&nbsp;</p>
            {% endfor %}
        {% endif %}

    {% endfor %}

</div>
</body>
</html>