Routines for peoextrn.kb


ContactNameFormatEvent

File Name

peoextrn.kb

Syntax

ContactNameFormatEvent (REF contactFmtList: LIST OF STRING)

Parameters

contactFmtList - list of string that contains the name format selected

Returns

Format of the contact names in the contact.contact_name field.

Side Effects

None

Description

This event prompts the user to provide the format of the names in the contact.contact_name field in the CONTACTS table. This function assumes that all contacts have names of the same format. If any contact has a middle name, then the user should enter a name format with a middle name. The function that takes the names and breaks them up determines that a contact does not have a middle name and assigns first and last names appropriately.

Dialog Forms Called

None


ContactSelect

File Name

peoextrn.kb

Syntax

ContactSelect (VAL site_id: String): STRING

Parameters

site_id - site ID provided by the user or selected from the database

Returns

A select statement.

Side Effects

None

Description

This function returns the select statement for the CONTACTS table.

Dialog Forms Called

None


FormatContactName

File Name

peoextrn.kb

Syntax

FormatContactName(REF contact: ContactRecord, VAL contactFmtList: LIST OF STRING)

Parameters

contact - a contact record

contactFmtList - contact name format entered by user

Returns

Contact record with formatted name.

Side Effects

None

Description

This procedure assumes that all contacts have names of the same format. If any contact has a middle name, then the user should enter a name format with a middle name. This procedure takes the names and breaks them up. It determines whether a contact has a middle name and assigns first and last names appropriately. The contact record has the formatted name in contact.last_name, contact.middle_name and contact.first_name.

Dialog Forms Called

None


FormatUserName

File Name

peoextrn.kb

Syntax

FormatUserName (REF user: UserRecord, VAL userFmtList: LIST OF STRING)

Parameters

user - a user record

userFmtList - user name format entered by user

Returns

user record with formatted name

Side Effects

None

Description

This procedure assumes that all users have names of the same format. If any user has a middle name, then the user should enter a name format with a middle name. This procedure takes the names and breaks them up. It determines whether a user has a middle name and assigns first and last names appropriately. The user record has the formatted name in user.last_name, user.middle_name and user.first_name.

Dialog Forms Called

None


MatchPerson

File Name

peoextrn.kb

Syntax

MatchPerson(VAL w: WINDOW, VAL peopleContactList: LIST OF PeopleContactRecord, VAL contact: ContactRecord, REF old_person: OldPeopleRecord ): INTEGER

Parameters

w - a window handle of the calling dialog box

peopleContactList - list of peopleContact records for contact

contact - contact record to try to match

old_person - old person record that matches the contact

Returns

1 for a match and -1 for no match

Side Effects

None

Description

This person takes the contact record and tries to match it with the list of people mapped to the contact (peopleContactList). If a match is found, the result is put in old_person.

Dialog Forms Called

None


PeopleSelect

File Name

peoextrn.kb

Syntax

PeopleSelect: STRING

Parameters

None

Returns

A select statement.

Side Effects

None

Description

This function returns the select statement for the people table.

Dialog Forms Called

None


SetPersonFmContact

File Name

peoextrn.kb

Syntax

SetPersonFmContact(VAL contact: ContactRecord, REF person: PeopleRecord)

Parameters

contact - contact record

person - new people record

Returns

None

Side Effects

None

Description

This procedure takes the contact record and sets the people record that is inserted into the new_people table. If this person was also mapped to an old person record, then this function overlays the last name, first name, and middle name from the old person record.

Dialog Forms Called

None


SetPersonFmOldPerson

File Name

peoextrn.kb

Syntax

SetPersonFmOldPerson(VAL old_person: OldPeopleRecord, REF person: PeopleRecord )

Parameters

old_person - people record

person - new people record

Returns

None

Side Effects

None

Description

This procedure takes the old person record and sets the people record that is inserted into the new_people table. If this person is also mapped to a contact, then the contact is overlaid on top of the mapping in this procedure.

Dialog Forms Called

None


SetPersonFmUser

File Name

peoextrn.kb

Syntax

SetPersonFmUser(VAL user: UserRecord, REF person: PeopleRecord)

Parameters

user - user record

person - people record

Returns

None

Side Effects

None

Description

This procedure takes the user record and sets the people record that is inserted into the new_people table. This procedure is called only if the user was not mapped to a person.

Dialog Forms Called

None


UserNameFormatEvent

File Name

peoextrn.kb

Syntax

UserNameFormatEvent (REF userFmtList: LIST OF STRING)

Parameters

userFmtList - list of string that contains the name format selected

Returns

Format of the users' names in the users.user_fullname field.

Side Effects

None

Description

This event prompts the user to provide the format of the names in the user.user_fullname field in the users table. This function assumes that all the users have names of the same format. If any user has a middle name, then the user should enter a name format with a middle name. The function that takes the names and breaks them up determines whether a user has a middle name and assigns first and last names appropriately.

Dialog Forms Called

None


UserSelect

File Name

peoextrn.kb

Syntax

UserSelect (VAL site_id: String): STRING

Parameters

site_id - site ID provided by the user or selected from the database

Returns

A select statement.

Side Effects

None

Description

This function returns the select statement for the users table.

Dialog Forms Called

None