---
title: Filter interested parties active on a date
summary: Operation details for Filter interested parties active on a date.
status: draft
owner: Technical Writer
last_reviewed: 2026-07-31
library: SAIF.Business.Policy.Affiliate
reference_type: package
operation_id: OP-005
trigger: A caller narrows an interested-party sequence to those active on a given date.
---

# Filter interested parties active on a date

This operation documents how `InterestdParyExtensions.Active` fulfills the policy-affiliate behavior described for `SAIF.Business.Policy.Affiliate`.

| Field | Value |
| --- | --- |
| **Operation ID** | OP-005 |
| **Trigger** | A caller narrows an interested-party sequence to those active on a given date. |
| **Inputs** | Interested-party sequence, as-of date |
| **Outputs** | Filtered `IEnumerable(Of clsInterestedParty)` |
| **Primary components** | `InterestdParyExtensions.Active` |
| **Entry point** | `Business\SAIF.Business.Policy.Affiliate\clsInterestedPartyCollection.vb` |

## Steps

1. Iterate the supplied interested-party sequence with a LINQ `Where` filter.
2. Keep an item only when `EffectiveDate` is on or before the as-of date and `CancelDate` is either null/open-ended or later than the as-of date ([BR-AFF-008](../business-rules.md#br-aff-008-interested-party-active-filters-honor-effective-and-cancel-dates)).
3. Return the filtered sequence without mutating the source collection.

## Process flow
The following diagram shows the in-memory LINQ filter and its effective/cancel-date test.

```mermaid
flowchart TD
  Start(["Caller supplies sequence + as-of date"]) --> Iterate["LINQ Where over sequence"]
  Iterate --> Check{"EffectiveDate <= asOf AND<br>(CancelDate is null OR CancelDate > asOf)?"}
  Check -->|Yes| Keep["Keep item in result"]
  Check -->|No| Drop["Exclude item"]
  Keep --> More{"More items?"}
  Drop --> More
  More -->|Yes| Iterate
  More -->|No| Result(["Return filtered sequence; source unchanged"])
```

## Failure and edge-case behavior

- The extension operates in memory; it does not re-query the database.

## 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\clsInterestedPartyCollection.vb`
