﻿---
title: clsHelpTextCollection
summary: API reference for clsHelpTextCollection.
status: draft
owner: SAIF
last_reviewed: 2026-07-24
library: SAIF.Business
reference_type: package
---

# clsHelpTextCollection

`clsHelpTextCollection` is a public class in `SAIF.Business` that inherits `clsBusinessCollectionBase` and retrieves application help-text entries for a single application code.

## Purpose
- Holds `clsHelpText` items with typed lookup by index and by reference-key value.
- Retrieves help-text rows by joining `APPLICATION_HELP_MASTER` and `APPLICATION_HELP_DETAIL` on reference-key value.
- Provides collection-level membership checks and a typed `CurrentItem` view.

## Context
- Namespace: `SAIF.Business`
- Assembly/package: `SAIF.Business`

## Public members
| Member | Signature | Purpose |
| --- | --- | --- |
| `Item` | `Default Public ReadOnly Property Item(ByVal Index As Integer) As clsHelpText` | Returns the help-text item at the specified collection index. |
| `Item` | `Default Public ReadOnly Property Item(ByVal inReferenceKeyValue As String) As clsHelpText` | Returns the first help-text item whose `ReferenceKeyValue` matches the supplied key, or `Nothing` when no match exists. |
| `CurrentItem` | `Public Shadows ReadOnly Property CurrentItem() As clsHelpText` | Returns the current collection item cast to `clsHelpText`. |
| `Contains` | `Public Overloads Function Contains(ByVal inHelpText As clsHelpText) As Boolean` | Returns whether an equal `clsHelpText` object exists in the collection. |
| `Contains` | `Public Overloads Function Contains(ByVal inReferenceKeyValue As String) As Boolean` | Returns whether any item in the collection has the supplied reference-key value. |
| `GetHelpTexts` | `Public Shared Function GetHelpTexts(ByVal inDataportal As IDataPortalInfo, ByVal inApplicationCode As String) As clsHelpTextCollection` | Retrieves all help-text entries for the supplied application code. |

## Behavioral notes
- `BeforeRetrieve` uses `MyCriteria.RetrieveSQL`, sets `CommandType.Text`, and binds `ApplicationCode` with length 5.
- `AfterRetrieve` reads each row from the returned `IDataReader`, creates a `clsHelpText`, loads it, and adds it to the collection.
- `GetHelpTexts` constructs a `Criteria` with the provided application code and retrieves the collection through `DataAccessLayer.RetrieveObject`.
- The constructor enables edit, remove, sort, and find behavior and sets `Managed = True`.
- This source file uses `ReferenceKeyValue` as the string key for lookup and containment checks.

## Constraints and usage notes
- The constructor is `Protected`; callers obtain instances through `GetHelpTexts`.
- The criteria object supports retrieval only: its `CreateSQL`, `DeleteSQL`, `InsertSQL`, and `UpdateSQL` members throw `ApplicationException`.
- This page documents only members declared on `clsHelpTextCollection`; inherited collection behavior comes from `clsBusinessCollectionBase`.

## Sources
- `Business\SAIF.Business\clsHelpTextCollection.vb`
