Skip to content

Format an affiliate display name

This operation documents how clsAffiliate.Name fulfills the policy-affiliate behavior described for SAIF.Business.Policy.Affiliate.

Field Value
Operation ID OP-002
Trigger A caller needs the affiliate name rendered for display or comparison.
Inputs clsAffiliate state
Outputs Formatted name string
Primary components clsAffiliate.Name
Entry point Business\SAIF.Business.Policy.Affiliate\clsAffiliate.vb

Steps

  1. Start with the stored last name as the leading display component (BR-AFF-002).
  2. Append the first name with a preceding comma only when the first name is populated.
  3. Append the middle initial and suffix only when each value is populated, preserving spacing without adding empty placeholders.
  4. Return the assembled display string.

Process flow

The following diagram shows how each name component is conditionally appended to build the display string.

flowchart TD
  Start(["Caller reads Name"]) --> Last["Start with LastName"]
  Last --> FirstCheck{"FirstName populated?"}
  FirstCheck -->|Yes| AppendFirst["Append comma + FirstName"]
  FirstCheck -->|No| SkipFirst["Skip first-name segment"]
  AppendFirst --> MICheck{"MiddleInitial populated?"}
  SkipFirst --> MICheck
  MICheck -->|Yes| AppendMI["Append MiddleInitial"]
  MICheck -->|No| SkipMI["Skip"]
  AppendMI --> SuffixCheck{"NameSuffix populated?"}
  SkipMI --> SuffixCheck
  SuffixCheck -->|Yes| AppendSuffix["Append NameSuffix"]
  SuffixCheck -->|No| SkipSuffix["Skip"]
  AppendSuffix --> Result(["Return assembled display string"])
  SkipSuffix --> Result

Failure and edge-case behavior

  • Empty name parts are skipped rather than rendered as blank separators.

Sources

  • Business\SAIF.Business.Policy.Affiliate\clsAffiliate.vb