Person

model.AddRole(query, role)
Parameters:
  • query (str) – see The Query Parameter

  • role (str) – The name of the role to be added to the persons in the query.

If a user does not exist, the user will be created. The user will have to use forgot password to be emailed a link to set their password. The role itself must exist, prior to calling this method.

The following roles will not be allowed: admin, manageapplication, backgroundcheck, creditcheck, delete, developer, finance, financeadmin, manager, manager2, membership, managetransactions, memberdocs,

model.AddTag(query, tagName, ownerId, clear)
Parameters:
  • query (str) – see The Query Parameter

  • tagName (str) – the name of the tag.

  • ownerId (str) – the PeopleId for the owner of the tag.

  • clear (bool) – if True and the tag already exists, it will first be cleared of previous content; default is False.

The tag will be added to if it already exists.

model.AgeInMonths(birthdate, asof)

:param date birthdate : The birthdate. :param date asof: The as of date.

This will return the age in months given the two dates. Fractional months are not considered.

model.ClearTag(tagName, ownerId)
Parameters:
  • tagName (str) – the name of the tag.

  • ownerId (str) – the PeopleId for the owner of the tag.

Removes the content of the tag.

model.PeopleIds(query)
Returns:

a list of PeopleIds from a query

Return type:

an enumerable list of int

Parameters:

query (str) – See The Query Parameter

Example:

pids = model.PeopleIds("")
for pid in pids:
    p = model.GetPerson(pid)
    print p.Name
model.RemoveRole(query, role)
Parameters:
  • query (str) – see The Query Parameter

  • role (str) – The name of the role to be removed from the persons in the query.

model.UpdateCampus(query, campus)
Parameters:
  • query (str) – see The Query Parameter

  • campus (int,str) – The CampusId or the campus name (use exact spelling to match an existing campus)

model.UpdateMemberStatus(query, status)
Parameters:
  • query (str) – see The Query Parameter

  • status (int,str) – The MemberStatusId or the member status description (use exact spelling to match existing status)

model.UpdateNamedField(query, field, value)
Parameters:
  • query (str) – see The Query Parameter

  • field (str) – The name of the field to update. See Person Object

  • campus (int,str) – The CampusId or the campus name (use exact spelling to match an existing campus)

model.UpdateNewMemberClassDate(query, date)
Parameters:
model.UpdateNewMemberClassDateIfNullForLastAttended(query, orgid)
Parameters:
  • query (str) – see The Query Parameter

  • orgid (str) – The OrganizationId for the last attend meeting

This will find the most recent attended date for each person in the specified Organization and update the person’s NewMemberClassDate with that date.

model.UpdateNewMemberClassStatus(query, status)
Parameters:
  • query (str) – see The Query Parameter

  • status (int,str) – The NewMemberClassStatusId or the new member class status description (use exact spelling to match existing status)

model.UpdateContributionOption(query, option)
Parameters:
  • query (str) – see The Query Parameter

  • option (int,str) – The Id of the option or the full name of the option as indicated in the table below

This determines what type of statement a person wants, Joint with spouse, or Individual, or None.

model.UpdateEnvelopeOption(query, option)
Parameters:
  • query (str) – see The Query Parameter

  • option (int,str) – The Id of the option or the full name of the option as indicated in the table below

This determines whether the person wants envelopes: either Joint with spouse, or Individual, or None.

model.UpdateElectronicStatement(query, truefalse)
Parameters:
  • query (str) – see The Query Parameter

  • truefalse (bool) – True for wants statements via secure web-site access only. False if wants printed statements.

Statement/Envelope Options

Id

Option

0

Not Specified

1

Individual

2

Joint

9

None



Latest Update

1/28/2023

Add ClearTag function and update AddTag function with clear parameter. Moved TaskNote functions to their own page.