Skip to main content
insightsoftware Documentation insightsoftware Documentation
{%article.title%}
Published:
Was this article helpful?
0 out of 0 found this helpful

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.

Copy

Syntax

COUNT (Variable)
COUNT ("DimName","SymName#")
COUNT (Schedule,"DimName","SymName#")            

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))

Published:

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.

Copy

Syntax

COUNT (Variable)
COUNT ("DimName","SymName#")
COUNT (Schedule,"DimName","SymName#")            

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))

For an optimal Community experience, Please view on Desktop