Count
Use this Longview Application Framework command to return the number of items in a list. This command can be used with either a list variable or a symbol.
Note: Only those symbols to which the user has access will be included in the return list.
where:
- Variable is the name of a variable.
- "DimName" is the name of a dimension containing the symbols.
- Schedule is the name of a schedule.
- "SymName#" is the name of a symbol and any relevant symbol hierarchy specification.
Copy
Syntax example 1
CREATE VARIABLE Count1[] AS String
CREATE VARIABLE CNT as NUM
SET VARIABLE Count1 = "P01ytd | p02ytd"
SET VARIABLE CNT = count ("Count1")
Copy
Syntax example 2
CREATE VARIABLE List
CREATE VARIABLE listcount
CREATE VARIABLE listcount2
CREATE VARIABLE listcount3
SET VARIABLE List = CreateList("Symbols", "Database" "Accounts", "TrialBalance###")
SET VARIABLE listcount = Count(List)
SET VARIABLE listcount2 = Count(Accounts, TrialBalance###)
SET VARIABLE listcount3 = Count(CreateList(Users))