0 Draft Bulk Group Member Mover Shared by Peter Sanders, Traders Point Christian Church 10 months ago 16.0 Group, Kids, Operations, Small Groups Intermediate Problem and ContextOur Kids Ministry is built on consistent small groups. Every year, when we promote kids to their new grade/classroom, we also need to promote them in their appropriate small groups. Some Kids groups are made up of multiple grades or birthdate ranges, which means a subset of the kids (group members) need to be moved to a new group (added to new group and removed from previous group). Historically, this required two Bulk Updates. The tool described below allows all of this to be done in one process, while including important data to help determine who needs to be moved. This can be adjusted for similar use cases.Workflow SetupThe process, as its currently built, uses three workflows.Workflow 1 selects the group the members are currently in. The form lets the user select a group, then the Group Id is saved as a workflow attribute. The workflow then redirect to a page that has the next workflow on it and appends the group Id onto the URL.Workflow 2 uses the group selected from Workflow 1 and displays the members with additional details. Those are displayed using a multi-select workflow attribute with the following lava in the Values section:{% assign group = 'Global' | PageParameter:'GroupId' | GroupById %} {% capture output %} {% assign sortedMembers = group.Members | Where:'GroupRoleId', '476' | OrderBy:'Person.BirthDate' %} {% for member in sortedMembers %} {{member.Person.PrimaryAlias.Guid}}^{{member.Person.FullName}} - {{member.Person.BirthDate | Date:'M/d/yyyy'}} {{member.Person.GradeFormatted}}, {% endfor %} {% endcapture %} {{output | ReplaceLast:',',''}}This multi-select generates the group members' Primary Alias Guid while displaying their full name, birth date, and grade. The user can select the group member that need to be moved. The selection is saved as a string. Then Workflow 2 activates Workflow 3 for each member via Lava Run. Here is the Lava Run code: {% assign oldGroup = Workflow | Attribute:'Group','Object' %}{% assign newGroup = Workflow | Attribute:'DestinationGroup','Object' %}{% assign kids = Workflow | Attribute:'GroupMembers','RawValue' | Split:',' %} {% for kid in kids %} {% workflowactivate workflowtype:'575' Person:'{{ kid }}' OldGroup:'{{ oldGroup.Guid }}' NewGroup:'{{ newGroup.Guid }}' %} Activated new workflow with the id of #{{ Workflow.Id }}. {% endworkflowactivate %} {% endfor %}Finally, Workflow 3 is passed the person, old group, and new group, then removes the person from the old group and adds them to their new group.