Describe a constituent in their dialogue window

When you open up a constituent record wouldn’t it be good to see a one line overview of the most important distinguishing features of their record even if they are on different tabs? This tip shows you how to put this information into the window dialogue title.

 This was used when I was at Jewish Community Federation of San Francisco. The idea is that you set up the user options to show a specific addressee or salutation in the title window. Normally this is populated by the constituent’s name or their regular primary salutation. Instead you need to select a custom defined salutation. The custom defined salutation is then created on

The following code is written in the VBA environment and should be placed in the RE_System_Object_Code using the Constituent_BeforeSave and/or Constituent_BeforeOpen functions

    Dim oConstit As CRecord
  Set oConstit = oRecord
  Dim oSal As CConstituentSalutation
  Dim bFound As Boolean
  Dim sMySal As String
 

  sMySal = getMySal(oConstit)
  For Each oSal In oConstit.Salutations
     If UCase(Trim(oSal.Fields(CONSTITUENT_SALUTATION_fld_SAL_TYPE))) = "MYCUSTOMSAL" Then
        bFound = True
        If oSal.Fields(CONSTITUENT_SALUTATION_fld_SALUTATION) <> sMySal Then
           oSal.Fields(CONSTITUENT_SALUTATION_fld_EDITABLE) = True
           oSal.Fields(CONSTITUENT_SALUTATION_fld_SALUTATION) = sMySal
        End If
        Exit For
      End If
  Next oSalutation
  If bFound = False Then
     With oConstit.Salutations.Add
        .Fields(CONSTITUENT_SALUTATION_fld_EDITABLE) = True
        .Fields(CONSTITUENT_SALUTATION_fld_SAL_TYPE) = "MyCustomSal"
        .Fields(CONSTITUENT_SALUTATION_fld_SALUTATION) = sMySal
        .Fields(CONSTITUENT_SALUTATION_fld_SALUTATION_ID) = 1
     End With
  End If
Even though we have customised the salutation we still have to give it an id as otherwise it will not save. The "1" is an arbitrary value.

The method getMySal can be used to return a string based on whatever characteristics you find useful. You will probably want their name and and maybe the constituent id. You may want to add an attribute or two, their constituent code or even when they were last modified and by whom.

Once that is done you need to set up the user options to use this new addsal in the window as shown below.

Using the custom addsal on the windows dialogue

One thought on “Describe a constituent in their dialogue window

  1. This is a great idea. Another which I’ve yet to try but have long wanted to try is to have a little floating summary window pop up when a record is open, which could list whatever we deemed important for the current user, e.g.,
    Total gifts:
    Bequest status:
    Do not call (or any other vital solicit codes)
    Has expired credit card

    Thanks for the great tip.

Comments are closed.