Boo for forums that don't work in Chrome!
PT = Primary Title
PF = Primary First Name
PL = Primary Last Name
PS = Primary Suffix
ST = Spouse Title
SF = Spouse First Name
SL = Spouse Last Name
SS = Spouse Suffix
Addressee
Salutation
Hi Joanne,
The Smart column is all the way on the right. When you add "Spouse Title" (for example) you can then check the box for Smart.
<!--[if gte mso 9]> Normal 0 false false false EN-US X-NONE X-NONE <style> /* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-priority:99; mso-style-parent:""; mso-padding-alt:0in 5.4pt 0in 5.4pt; mso-para-margin-top:0in; mso-para-margin-right:0in; mso-para-margin-bottom:8.0pt; mso-para-margin-left:0in; line-height:107%; mso-pagination:widow-orphan; font-size:11.0pt; font-family:"Calibri",sans-serif; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin;} </style>
Unfortunatley I couldn't upload a file for this... but here you go!
'======================================= 'GetTitle - Get the correct title '======================================= Public Shared Sub GetTitle(ByRef sPTitle As String, sPGender As String, sPLName As String, sSTitle As String, sSGender As String, sSLName As String) ' If title blank If sPTitle = "" Then ' If Male then Mr. and done If sPGender = "Male" Then sPTitle = "Mr." End If ' If Female If sPGender = "Female" Then ' Check spouse If UCase(sPLName) = UCase(sSLName) Then ' If there is a spouse & last names match then Mrs. else Ms. sPTitle = "Mrs." Else sPTitle = "Ms." End If End If End If End Sub '======================================= 'SetAddrSal - Set the correct addressee and salutation '======================================= Public Shared Sub SetAddrSal(oRec As CRecord) If oRec.Fields(ERECORDSFields.RECORDS_fld_KEY_INDICATOR) = 2 Then Dim sPTitle As String = "" Dim sPFirst As String = "" Dim sPLast As String = "" Dim sPSuffix As String = "" Dim sPGender As String = "" Dim sSTitle As String = "" Dim sSFirst As String = "" Dim sSLast As String = "" Dim sSSuffix As String = "" Dim sSGender As String = "" Dim oSpouse As CIndividual Dim iAddr As Integer = 0 Dim iSal As Integer = 0 oSpouse = oRec.Relations.Individuals.Spouse sPTitle = oRec.Fields(ERECORDSFields.RECORDS_fld_TITLE_1) sPFirst = oRec.Fields(ERECORDSFields.RECORDS_fld_FIRST_NAME) sPLast = oRec.Fields(ERECORDSFields.RECORDS_fld_LAST_NAME) sPSuffix = oRec.Fields(ERECORDSFields.RECORDS_fld_SUFFIX_1) sPGender = oRec.Fields(ERECORDSFields.RECORDS_fld_GENDER) If Not oSpouse Is Nothing Then If oSpouse.Fields(EINDIVIDUALFields.INDIVIDUAL_fld_DECEASED) <> -1 Then sSTitle = oSpouse.Fields(EINDIVIDUALFields.INDIVIDUAL_fld_TITLE1) sSFirst = oSpouse.Fields(EINDIVIDUALFields.INDIVIDUAL_fld_FIRST_NAME) sSLast = oSpouse.Fields(EINDIVIDUALFields.INDIVIDUAL_fld_LAST_NAME) sSSuffix = oSpouse.Fields(EINDIVIDUALFields.INDIVIDUAL_fld_SUFFIX1) sSGender = oSpouse.Fields(EINDIVIDUALFields.INDIVIDUAL_fld_GENDER) End If oSpouse = Nothing End If GetTitle(sPTitle, sPGender, sPLast, sSTitle, sSGender, sSLast) GetAddrSal(sPTitle, sPLast, sSTitle, sSLast, iAddr, iSal) oRec.Fields(ERECORDSFields.RECORDS_fld_TITLE_1) = sPTitle oRec.Fields(ERECORDSFields.RECORDS_fld_PRIMARY_ADDRESSEE_ID) = iAddr oRec.Fields(ERECORDSFields.RECORDS_fld_PRIMARY_SALUTATION_ID) = iSal End If End Sub '======================================= 'SetAddrSalRel - Set the correct addressee and salutation '======================================= Public Shared Sub SetAddrSalRel(oInd As CIndividual2, Optional oImport As ImportOM.API.iImportSession = Nothing) If oImport Is Nothing Then oImport = Profile.Import End If Dim sPTitle As String = "" Dim sPFirst As String = "" Dim sPLast As String = "" Dim sPSuffix As String = "" Dim sPGender As String = "" Dim sSTitle As String = "" Dim sSFirst As String = "" Dim sSLast As String = "" Dim sSSuffix As String = "" Dim sSGender As String = "" Dim oRec As CRecord Dim iAddr As Integer = 0 Dim iSal As Integer = 0 sPTitle = oInd.Fields(EINDIVIDUAL2Fields.INDIVIDUAL2_fld_TITLE1) sPFirst = oInd.Fields(EINDIVIDUAL2Fields.INDIVIDUAL2_fld_FIRST_NAME) sPLast = oInd.Fields(EINDIVIDUAL2Fields.INDIVIDUAL2_fld_LAST_NAME) sPSuffix = oInd.Fields(EINDIVIDUAL2Fields.INDIVIDUAL2_fld_SUFFIX1) sPGender = oInd.Fields(EINDIVIDUAL2Fields.INDIVIDUAL2_fld_GENDER) If oInd.Fields(EINDIVIDUAL2Fields.INDIVIDUAL2_fld_IS_SPOUSE) = -1 Then oRec = New CRecord oRec.Init(oImport.SessionContext) oRec.Load(oInd.Fields(EINDIVIDUAL2Fields.INDIVIDUAL2_fld_CONSTIT_ID)) If oRec.Fields(ERECORDSFields.RECORDS_fld_DECEASED) <> -1 Then sSTitle = oRec.Fields(ERECORDSFields.RECORDS_fld_TITLE_1) sSFirst = oRec.Fields(ERECORDSFields.RECORDS_fld_FIRST_NAME) sSLast = oRec.Fields(ERECORDSFields.RECORDS_fld_LAST_NAME) sSSuffix = oRec.Fields(ERECORDSFields.RECORDS_fld_SUFFIX_1) sSGender = oRec.Fields(ERECORDSFields.RECORDS_fld_GENDER) End If oRec.CloseDown() oRec = Nothing End If GetTitle(sPTitle, sPGender, sPLast, sSTitle, sSGender, sSLast) GetAddrSal(sPTitle, sPLast, sSTitle, sSLast, iAddr, iSal) oInd.Fields(EINDIVIDUAL2Fields.INDIVIDUAL2_fld_TITLE1) = sPTitle oInd.Fields(EINDIVIDUAL2Fields.INDIVIDUAL2_fld_PRIMARY_ADDRESSEE_ID) = iAddr oInd.Fields(EINDIVIDUAL2Fields.INDIVIDUAL2_fld_PRIMARY_SALUTATION_ID) = iSal End Sub '======================================= 'GetAddrSal - Get the correct addressee and saluation (used by SetAddrSal) '======================================= Public Shared Sub GetAddrSal(sPTitle As String, sPLName As String, sSTitle As String, sSLName As String, ByRef sAddr As Integer, ByRef sSal As Integer) Dim sPF As Integer = 34 Dim sPF_SF As Integer = 28 Dim sPT_PL As Integer = 21 Dim sPT_PL_ST_SL As Integer = 17 Dim sPT_ST_PL As Integer = 16 Dim sST_PT_SL As Integer = 19 Dim sPF_PL_PS As Integer = 1 Dim sPF_SF_PL As Integer = 5 Dim sPF_PL_PS_SF_SL_SS As Integer = 50 sPLName = UCase(sPLName) sSLName = UCase(sSLName) 'Select correct addressee If sSLName = "" Then 'If the Spouse does not exist sAddr = sPF_PL_PS Else 'Spouse exists If sSLName = sPLName Then 'Same last name sAddr = sPF_SF_PL Else ' Diff last name sAddr = sPF_PL_PS_SF_SL_SS End If End If ' Select correct salutation ' If Primary Title does not exist If sPTitle = "" Then ' If Spouse does not exist If sSLName = "" Then sSal = sPF Else ' Spouse Exists sSal = sPF_SF End If Else ' Primary Title exists ' If Spouse does not exist If sSLName = "" Then sSal = sPT_PL Else ' Spouse Exists ' If Spouse does not have title If sSTitle = "" Then sSal = sPF_SF Else ' Spouse has title ' If Last names do not match If sPLName <> sSLName Then sSal = sPT_PL_ST_SL Else ' Last Names match ' If Titles Match If sPTitle = sSTitle Then Select Case sPTitle Case "Mr.", "Ms.", "Mrs." sSal = sPF_SF Case "Dr." sSal = sPT_PL_ST_SL ' TODO: SHOULD BE Drs. Editable! Case Else sSal = sPT_PL_ST_SL End Select Else ' Titles do not match If sSTitle = "Ms." Or sSTitle = "Mrs." Then ' Spouse title is female sSal = sPT_ST_PL ElseIf sPTitle = "Ms." Or sPTitle = "Mrs." Then ' Primary title is female sSal = sST_PT_SL Else 'Neither title is female and they don't match (Dr. & Mr., Rev. & Dr, etc.) sSal = sPT_PL_ST_SL End If End If End If End If End If End If End Sub
ps
PF = Primary First Name
SF = Spouse First Name
PT = Primary Title
PL = Primary Last Name
ST = Spouse Title
SL = Spouse Last Name
PS = Primary Suffix
SS = Spouse Suffix
So sPT_PL = Primary Title Primary Last Name
The Number is the ID of the salutation (from the RE salutation report)
Joanne Danganan
My import files always have a mix of single individuals and couples. What setting do you recommend for addressees and salutations, where IOM will recognize when to include a spouse? Right now, I set addressee and salutation to reflect only the head of household, and then I go into individual's records to include any spouses. As you can imagine, this can be cumbersome...
Thanks in advance,
Joanne