---
title: Format an affiliate display name
summary: Operation details for Format an affiliate display name.
status: draft
owner: Technical Writer
last_reviewed: 2026-07-31
library: SAIF.Business.Policy.Affiliate
reference_type: package
operation_id: OP-002
trigger: A caller needs the affiliate name rendered for display or comparison.
---

# 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](../business-rules.md#br-aff-002-affiliate-display-names-omit-empty-parts)).
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.

```mermaid
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.

## Related documentation
- [Operations and processes](../operations-processes.md)
- [Business rules](../business-rules.md)
- [SQL catalog](../sql/index.md)
- [Database tables](../database-tables.md)

## Sources
- `Business\SAIF.Business.Policy.Affiliate\clsAffiliate.vb`
