{% comment %} CSV Person Importer for Rock RMS, version 1.1. Paste this whole file into an HTML Content block. In the block settings, turn on the RockEntity Lava command and leave Cache Duration at 0. The group list is built for each person, so caching would show one person's list to everyone. Two settings, right below this note: importerGroupTypeIds: group type Ids people can be added to after an import, separated by commas with no spaces, like '25,32'. Leave it as '' to turn off group placement. importerImportedFromKey: key of a Person attribute (Text) that records where each person came from. If your Rock doesn't have one, the importer skips that step. {% endcomment %} {% assign importerGroupTypeIds = '' %} {% assign importerImportedFromKey = 'ImportedFrom' %} {% assign importerPersonId = CurrentPerson.Id | Default:0 %} {% if PageParameter.ImporterGroups == '1' %} {% comment %} Group list for group placement, rendered for the signed-in person only when the importer asks for it. A group is listed only when it is active, not archived, not a security role and of an allowed type. The person must also be able to view it (securityenabled) and add members to it (Edit or Manage Members). Each group type gets its own command on purpose. Rock reads a where clause strictly left to right and ignores parentheses. A single combined filter works only while every "||" comes before every "&&", and a later edit that breaks that order would let inactive, archived or security-role groups through. Each group's JSON stays on one line because whitespace inside the loop would repeat for every group. {% endcomment %} {% else %}
Loading the importer...