We've created a few special methods to help you work with Alternate Phones and Secondary Jobs.
These methods help you target a specific alternate phone or secondary job record.
Get by Code
This string method targets a specific alternate phone or secondary job record.
Find a secondary job long title by specifying the job code:
SecondaryJobs.GetByCode("ACCOUNT")?.LongTitleIf an employee has a secondary job with the code ACCOUNT, this expression will return the long job title (Accountant). If not, it will simply return null.
SecondaryJobs.GetByCode("ADMIN")?.LongTitleIf an employee has a secondary job with the code ADMIN, this expression will return the long job title (Administrator). If not, it will simply return null.
Find an alternate phone number by specifying the phone type code:
AlternatePhones.GetByCode("CEL")?.PhoneNumberIf an employee has an alternate phone with the code CEL, this expression will return the cell phone number (555 555 5555). If not, it will simply return null.
AlternatePhones.GetByCode("WRKCEL")?.PhoneNumberIf an employee has an alternate phone with the code WRKCEL, this expression will return the work cell phone number (555 555 5555). If not, it will simply return null.
Has Code
This string method checks whether the employee record has a specific alternate phone number or a secondary job record.
Does the employee have a specific secondary job record?
SecondaryJobs.HasCode("ACCOUNT")If the employee has a secondary job with the code ACCOUNT, this expression will return true, otherwise, it will return false.
SecondaryJobs.HasCode("ADMIN")If the employee has a secondary job with the code ADMIN, this expression will return true, otherwise, it will return false.
Does the employee have a specific alternate phone record?
AlternatePhones.HasCode("CEL")If the employee has an alternate phone with the code CEL, this expression will return true, otherwise, it will return false.
AlternatePhones.HasCode("WRKCEL")If the employee has an alternate phone with the code WRKCEL, this expression will return true, otherwise, it will return false.
Get a list of used Codes
This string method gets a list of codes used on the employee record.
Get a list of all the employees' secondary job codes:
SecondaryJobs.GetCodes()This will return a list of all secondary job codes used by this employee (ACOUNT, ADMIN).
Get a list of the employees' alternate job codes:
AlternatePhones.GetCodes()This will return a list of all alternate phone codes used by this employee (CEL, WRKCEL).
Comments
0 comments
Article is closed for comments.