Description: Returns distinct non-empty entry values selected from the most-common set, the latest-record set, or their union.
Calling convention: CIP_GetTopNValues(ObjectName: String, EntryName: String, MostCommonValueCount: Variant, LatestValueCount: Variant)
Parameters:
ObjectName: registered object name.
EntryName: entry to query.
MostCommonValueCount: maximum number ordered by occurrence count; 0 disables this set and NULL requests all.
LatestValueCount: maximum number ordered by latest DATA_ID; 0 disables this set and NULL requests all.
Returns: One-dimensional Variant array, although the registration omits the return type. Unknown objects or entries raise an exception.
Availability: Default; uses SQL Server TOP syntax and reads the object's database data.
Example:
Values := CIP_GetTopNValues("Continents", "DemoMemo", 2, 3);