---
title: Retrieve help text for a screen field
summary: Loads a single read-only help-text record for a given application code and reference key.
status: draft
owner: SAIF documentation generator
last_reviewed: 2026-08-17
library: SAIF.Presentation.Web.Controls.AJAX.Infragistics103
reference_type: package
operation_id: OP-AJAX-004
trigger: Consuming presentation code needs help text for a specific screen field
---

# Retrieve help text for a screen field

`clsHelpText.GetHelpText` is the public shared factory method that retrieves a single, read-only help-text record for a given application code and reference key value. `HoverHelp` renders content from an already-retrieved `clsHelpText` instance rather than calling this factory itself, but this factory is the documented retrieval entry point of the business object.

| Field | Value |
| --- | --- |
| **Operation ID** | OP-AJAX-004 |
| **Trigger** | Consuming presentation code calls `clsHelpText.GetHelpText(inDataportal, inApplicationCode, inReferenceKeyValue)` |
| **Inputs** | `IDataPortalInfo`, application code, reference key value |
| **Outputs** | A populated, read-only `clsHelpText` instance |
| **Primary components** | `clsHelpText.GetHelpText`, `clsHelpText.Criteria`, `clsHelpText.BeforeRetrieve`, `clsHelpText.AfterRetrieve`, `clsHelpText.Fill` |
| **Entry point** | `SAIF.Presentation.Web.Controls.AJAX.Infragistics103\clsHelpText.vb` |

## Steps

1. Constructs a `Criteria(inDataportal, inApplicationCode, inReferenceKeyValue)` object.
2. Calls `inDataportal.DataAccessLayer.RetrieveObject(criteria)`, which invokes the BOF data-portal pipeline: `BeforeRetrieve` builds an `IDataRequest` with `SQLStatement = MyCriteria.RetrieveSQL` and adds bind parameters `ApplicationCode` (max length 5) and `ReferenceKeyValue` (max length 40) — executing [SQL-HELP-001](../sql/SQL-HELP-001-retrieve-help-text-for-a-screen-field.md) against [APPLICATION_HELP_MASTER](../database-tables.md#applicationhelpmaster) and [APPLICATION_HELP_DETAIL](../database-tables.md#applicationhelpdetail).
3. `AfterRetrieve` casts the result to `clsSAIFDataReader`, reads the first row, and calls `Fill()` to populate `ApplicationCode`, `ReferenceKeyDescription`, `ReferenceKeyValue`, `HelpText`; marks the object `MarkOld()` (BOF convention for "unmodified, loaded from DB").
   - On failure to find a matching row: `Reader.Read()` returns `False`, `Fill()` is skipped, and the object's fields retain their default (empty-string) initial values.
4. No update/insert/delete paths exist for this object — `CreateSQL`, `InsertSQL`, `UpdateSQL`, `DeleteSQL` all `Throw New ApplicationException(BOC.Messages.InvalidSQLProperty)`; this object is retrieve-only by design.

No business rules are enforced by this operation — this is a lookup-only reference object with no `AddErrorMessage`/business-rule calls in the reviewed code.

## Process flow

The following diagram visualizes the retrieval sequence.

```mermaid
flowchart TD
	Start([Consuming code calls GetHelpText]) --> Criteria[Construct Criteria with ApplicationCode/ReferenceKeyValue]
	Criteria --> Retrieve[DataAccessLayer.RetrieveObject]
	Retrieve --> Before[BeforeRetrieve binds parameters, sets RetrieveSQL]
	Before --> Execute[Execute SQL-HELP-001 against Oracle*]
	Execute --> After{Row returned?}
	After -->|Yes| Fill[AfterRetrieve.Fill populates fields, MarkOld]
	After -->|No| Empty([Object retains default empty values])
	Fill --> Return([Return populated clsHelpText])
```

## Failure and edge-case behavior
- No matching row for the given application code/reference key: `Reader.Read()` returns `False`; the returned object's fields remain at their default empty-string values rather than raising an error.
- Any attempt to `Save()`/`Delete()` this object raises `ApplicationException(BOC.Messages.InvalidSQLProperty)`, since no create/update/delete SQL exists.

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

> **Note:** Statements marked with * were inferred from code structure, naming conventions, or
> contextual evidence where direct confirmation was not available in source artifacts. Statements
> marked with ** could not be confirmed; treat as unknown until verified.

## Sources
- `SAIF.Presentation.Web.Controls.AJAX.Infragistics103\clsHelpText.vb`
- `SAIF.Presentation.Web.Controls.AJAX.Infragistics103\HoverHelp.vb`
