Organizations

model.CurrentOrgId

Set this to the OrganizationId that should be used for email replacements.

model.AddMembersToOrg(query, orgid)
Parameters:
  • query (str) – see The Query Parameter
  • orgid (int) – The Organization id number to add the person too
model.AddMemberToOrg(pid, orgid)
Parameters:
  • pid (int) – The People id of the individual person to update.
  • orgid (int) – The Organization id number to add the person too.
model.AddOrganization(name, program, division)
Returns:

the OrganizationId

Return type:

int

Parameters:
  • name (str) – the name of the org
  • program (str) – the name of the program
  • division (str) – the name of the division

Creates a new Organization. The program and division will be created if not already existing.

model.AddOrganization(name, templateid, copysettings)
Returns:

the OrganizationId

Return type:

int

Parameters:
  • name (str) – the name of the org
  • templateid (int) – the OrganizationId of the org to be copied
  • copysettings (bool) – the default is to copy the settings, set to False if to prevent.

Creates a new Organization. The templateid allows you to use the same program and division of the template org Entrypoint, OrganizationType, Campus, Status are all copied too. If CopySettings is True, the Schedules are copied as well as FirstMeetingDate, LastMeetingDate, Limit, RegistrationType, RegStart, RegEnd, IsMissionTrip and all Registration Fees, Questions and Messages.

model.AddSubGroup(pid, orgid, group)

Adds a person to a sub-group in the organization.

Parameters:
  • pid (int) – PeopleId
  • orgid (int) – OrganizationId
  • group (str) – The name of the sub-group
model.AddSubGroupFromQuery(query, orgid, group)

Adds multiple org members to a sub-group in the organization using a query.

Parameters:
  • query (str) – see The Query Parameter
  • orgid (int) – OrganizationId
  • group (str) – The name of the sub-group

It is important to have the query only return members of the org. This function will silently skip persons who are not members of the organization.

model.DropOrgMember(pid, orgid)

Drops a person from the organization.

Parameters:
  • pid (int) – PeopleId
  • orgid (int) – OrganizationId
model.InOrg(pid, orgid)
Returns:

True or False whether a person is a member of an organization.

Return type:

bool

Parameters:
  • pid (int) – PeopleId
  • orgid (int) – OrganizationId
model.InSubGroup(pid, orgid, group)

Determines whether a person is in a sub-group in organization

Return type:

boolean

Parameters:
  • pid (int) – PeopleId
  • orgid (int) – OrganizationId
  • group (str) – The name of the sub-group
model.JoinOrg(orgid, person)

Adds the person to the organization as a regular member.

Parameters:
  • person (int,Person) – this can either be a Person object or a PeopleId int
  • orgid (int) – OrganizationId
model.MoveToOrg(pid, fromOrg, toOrg)

Drops person from one org and adds them to another.

Parameters:
  • pid (int) – PeopleId
  • fromOrg (int) – OrganizationId for current membership to drop
  • toOrg (int) – OrganizationId for new membership to add to
model.OrganizationIds(progid, divid, *includeinactive)
Returns:

A list of Organization ids in the respective program and division

Return type:

Enumerable list of int

Parameters:
  • progid (int) – The id number of the Program, or 0 for any program.
  • divid (int) – The id of the Division, or 0 for any division.
  • includeinactive (bool) – *optional default=False. By default no inactive organizations will be included. Pass True to include them.
model.RemoveSubGroup(pid, orgid, group)

Removes a person from a sub-group in the organization.

Parameters:
  • pid (int) – PeopleId
  • orgid (int) – OrganizationId
  • group (str) – The name of the sub-group
model.SetMemberType(peopleid, orgid, type)
Parameters:
  • pid (int) – PeopleId
  • orgid (int) – OrganizationId
  • type (str) – Sets the MemberType of the person in the org

A new MemberType will be created if no type of that name exists.

model.UpdateMainFellowship(orgid)
Parameters:orgid (int) –

Updates MainFellowship flag on all members, and MemberCounts.