Search application info logs¶
clsAppInfoCollection exposes two GetAppInfoCollection factory overloads that share the same criteria-driven retrieve used by Search application error logs, with three differences specific to the info side: a scoped full-text search (SearchType), a default EPAY/DirectDeposit exclusion, and no sort-field support in the built SQL.
| Field | Value |
|---|---|
| Operation ID | OP-LV-07 |
| Trigger | Caller calls GetAppInfoCollection(inDataportal, inCreateDate) or GetAppInfoCollection(inDataportal, inCriteria) |
| Inputs | IDataPortalInfo; optional CreateDate, StartDate/EndDate range, MachineName, AppName, Environment, UserName, SearchText, SearchType (MessageAndData/MessageOnly/DataOnly), ExcludeEpayAndDD (defaults to True) on the Criteria object |
| Outputs | clsAppInfoCollection populated with up to 300 clsAppInfo child objects; TotalCount set to the full matching row count |
| Primary components | clsAppInfoCollection.GetAppInfoCollection (two overloads), clsAppInfoCollection.Criteria.BuildWhere, clsAppInfoCollection.Criteria.GetSearchValue, clsAppInfoCollection.BeforeRetrieve, clsAppInfoCollection.AfterRetrieve |
| Entry point | Application\SAIF.Application.LogView\clsAppInfoCollection.vb |
Steps¶
- Select an entry overload. The date-only overload wraps
inCreateDatein a newCriteria; the caller-supplied-criteria overload passes a pre-builtCriteriastraight through. Both ultimately callinDataportal.DataAccessLayer.RetrieveObject(...). - Build the
WHEREclause (BuildWhere). - Date filtering: same range-vs-single-date pattern as the error side — an inclusive
Create_Daterange when bothStartDateandEndDateare set, otherwise a date-only-cast equality onCreateDatewhen set. - Machine/app filters: if
MachineNameorAppNameis non-empty and not[ALL], add an equality predicate (BR-002). - Environment filter: if non-empty and not
[ALL], split on;into a quotedIN (...)list (BR-003). - User filter:
;-delimited values become anIN (...)list; a single value useslike @UserName. - Full-text filter: if
SearchTextis non-empty, branch onSearchTypeand appendCONTAINS((Message_Text, Data_Text), @SEARCHTEXT),CONTAINS((Message_Text), @SEARCHTEXT), orCONTAINS((Data_Text), @SEARCHTEXT)accordingly (BR-009, BR-004). - EPAY/DirectDeposit exclusion: if
ExcludeEpayAndDDisTrue(the default), appendand not (App_Name in ('EPAY','DirectDeposit'))(BR-008). - Any leading
ANDproduced by the assembly is trimmed from the final string. - Normalize the search text (
GetSearchValue), whenSearchTextis supplied. Identical logic to the error-side normalization: strip quotes, tokenize on spaces/commas/semicolons, preserve recognized logic-operator tokens (AND,&,OR,|,&!) unquoted, and quote every other token — joining plain tokens withANDwhen no explicit operator is present (BR-004). - Configure the retrieve requests (
BeforeRetrieve). Two data requests are queued: aResultSetrequest usingRetrieveSQL(SELECT TOP 300 ...) (SQL-007, App_Info) (BR-001), and aScalarrequest usingRetrieveSQLCount(SELECT count(*) ...) (SQL-008, App_Info). Each parameter (@CreateDate,@MachineName,@Username,@AppName,@SEARCHTEXT) is bound only when the corresponding criteria value is populated and (forMachineName/AppName) not[ALL]. - Unlike the error-side collection,
clsAppInfoCollection.Criteria.RetrieveSQLbuilds noORDER BYclause at all, so result ordering for info searches is whatever the database returns without an explicit sort.* - Load the results (
AfterRetrieve). For every row in the first result set, create a newclsAppInfo, callLoad(...)on it, and add it to the collection viaMyBase.Add. SetTotalCountfrom the second (scalar count) request. ClearMyCriteria.IsDirty. - Save the collection, if edited.
clsAppInfoCollection.Save()overrides the baseSave()to callMe.ApplyEdit()before delegating toMyBase.Save()— relevant only if the collection's items were edited in place rather than used purely for read-only search results.*
Process flow¶
The following diagram visualizes the filter-build, execute, and load sequence, including the default audit-noise exclusion.
flowchart TD
Start([Caller calls GetAppInfoCollection]) --> Build[BuildWhere: date, machine,<br>app, environment, user predicates]
Build --> Search{SearchText supplied?}
Search -->|Yes| Scope[Branch on SearchType:<br>Message+Data, Message only, or Data only]
Scope --> Normalize[GetSearchValue: strip quotes,<br>tokenize, preserve logic operators]
Search -->|No| Exclude
Normalize --> Exclude{ExcludeEpayAndDD?}
Exclude -->|Yes, default| AddExclude[Append EPAY/DirectDeposit exclusion]
Exclude -->|No| Rows
AddExclude --> Rows[Execute TOP 300 row query,<br>no ORDER BY]
Rows --> Count[Execute matching COUNT query]
Count --> Load[Load each row into a<br>new clsAppInfo; set TotalCount]
Load --> Done([Collection and TotalCount returned])
Failure and edge-case behavior¶
- The row query is hard-capped at 300 rows (BR-001) even when
TotalCountreports more matches. clsAppInfoCollection.Criteria.RetrieveSQLhas noBuildOrder/ORDER BYclause, unlike the error-side collection, so info search result ordering is not explicitly controlled by this library.*ExcludeEpayAndDDdefaults toTrue, so standard searches silently omitEPAYandDirectDepositaudit rows unless a caller explicitly sets the property toFalse(BR-008).SearchTypedefaults toMessageAndData; callers who intend a narrower search must set it explicitly before the criteria is built (BR-009).SearchTextnormalization strips all quote characters from the raw input before tokenizing, identical to the error-side behavior.
Related documentation¶
Note: Statements marked with
*were inferred from code structure, naming conventions, or contextual evidence where direct confirmation was not available in source artifacts.
Sources¶
Application\SAIF.Application.LogView\clsAppInfoCollection.vbApplication\SAIF.Application.LogView\modLogViewExtensions.vb