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

CreateList

Use this Longview Application Framework function to return a list of item names to a list variable.

The CreateList function requires the use of Set Variable List to define the variable to which the function will be returning data. See the syntax examples below.

Syntax

The CreateList function can return a list of any of the following items:

List item

Description

Attributes

All Attributes of a particular class in the Data Server repository. For more information, see Attributes.

Columns

Properties of all columns in the specified Data Table.

Note: This does not work on Virtual data tables.

Column Names

A list of column names in the specified Data Table.

Note: This does not work on Virtual data tables.

Dimensions

Dimensions in the Data Server repository. For more information, see Dimensions.

Groups

User groups in the Data Server. For more information, see Groups.

Journal Entry Subcategories

Journal entry subcategories in the Data Server repository. For more information, see Journal entry subcategories.

Populated data

Populated elements in the selected DataArea. For more information, see Populated data.

Properties

Level-one properties of the specified object. For more information, see Properties.

Server rules

Server rules in the Data Server repository. For more information, see Server rules.

Schedules

Schedules in the Data Server repository. For more information, see Schedules.

Schedule Dimensions

Schedule dimensions in the Data Server repository. For more information, see Schedule Dimensions.

Schedule Symbols

Schedule symbols in the Data Server repository. For more information, see Schedule Symbols.

Symbols

Descendent symbols in the Data Server repository. In this case, the CreateList command will return a list of the symbols the user has access to in the specified DataArea. For more information, see Symbols.

Users

User IDs in the Data Server. For more information, see Users.

Symbol Descriptions

Descendent symbol descriptions in the Data Server repository. In this case, the CreateList command will return a list of the symbol descriptions for the symbols the user has access to in the specified DataArea. For more information, see Symbol Descriptions.

Schedule Symbol Descriptions

Schedule symbol descriptions in the Data Server repository. For more information, see Schedule Symbol Descriptions.

Workflows

Active Workflow processes in the Data Server Repository.

WorkflowSteps

Names of workflow steps for a specified Workflow process.

Attributes

Lists all Attributes in the specified Attribute class.

Copy

Syntax

CREATELIST ("ATTRIBUTES","AttrClass")        

where:

  • AttrClass is the Attribute class. Select one of the following:

    Value

    Description

    SYSTEM

    Describes the entire Longview system at the highest level. Attributes of this Attribute class specify system-wide characteristics. There is only one object in the SYSTEM Attribute class, called DBDefault.

    USER

    Describes the Attributes of a particular user. Each user is an object in the USER Attribute class.

    SYMBOL

    Describes the characteristics of individual symbols. Each symbol is an object in the SYMBOL Attribute class.

Copy

Syntax example

CREATE VARIABLE List1[] AS STRING
SET VARIABLE List1 = CREATELIST ("ATTRIBUTES","USER")        

The output of the list appears as:

AttrName

Columns

Lists column information for all columns in the specified Data Table. The list is returned as an OBJECTLIST and lists the column name, Longview column data type, string length (if applicable) and whether the column is nullable for each column.

CREATELIST ("COLUMNS", "dataTableName")

The result will be an object list with the following properties:

  • Name returns the name of the nth column
  • Type returns the Longview column datatype for the nth column. Valid values are:
    • AutoInteger
    • AutoUser
    • Boolean
    • Date
    • Dimension
    • File
    • Integer
    • Number
    • String
    • Symbol
    • User
    • UserList
  • StringLength returns the string length of the nth column, if applicable
  • Nullable returns whether or not the nth column is nullable. Valid values are:
    • TRUE
    • FALSE
Copy

Syntax example

SET VARIABLE ObjectList1 = CREATELIST ("COLUMNS", "SalaryTable")        

The output of the object list appears as:

EmpID, Number, 0, FALSE

FirstName, String, 256, TRUE

LastName, String, 256, TRUE

Position, String, 256, TRUE

Manager, String, 256, TRUE

HireDate, Date, 0, TRUE

Salary, Number, 0, TRUE

ColumnNames

Lists all columns in the specified Data Table. The list is returned as a STRINGLIST.

CREATELIST ("COLUMNNAMES", "dataTableName")

Copy

Syntax example

SET VARIABLE List1 = CREATELIST ("COLUMNNAMES", "SalaryTable")        

The output of the list appears as:

EmpID, FirstName, LastName, Position, Manager, HireDate, Salary

Dimensions

Lists all dimensions in the database.

CREATELIST ("DIMENSIONS")

Copy

Syntax example

SET VARIABLE List1 = CREATELIST ("DIMENSIONS")        

The output of the list appears as:

DimName

Groups

Lists all user groups.

CREATELIST ("GROUPS")

Copy

Syntax example

SET VARIABLE List1 = CREATELIST ("GROUPS")        

The output of the list appears as:

User Group

Journal entry subcategories

Lists Journal entry subcategory information in a variable of type STRINGLIST or OBJECTLIST.

CREATELIST ("JESUBCATEGORIES")

Copy

Syntax example

CREATE VARIABLE List1[] AS OBJECT
SET VARIABLE List1 = CREATELIST ("JESUBCATEGORIES")            

The result will be a list of strings or objects with the following properties:

  • ID returns the subcategory ID
  • Name returns the description of the subcategory
  • Category returns either "STANDARD" or "ELIMINATION"
  • ScheduleName retruns the schedule name, if applicable
  • Reclassification returns 1 or 0.

Populated data

Lists the populated elements in the specified DataArea. Populated data excludes zeros and null values.

CREATELIST ("PopulatedData", "DataArea", "NUM|STRING|BOTH", "VALUES|DimName"[, "dataspec.lvdsp"])

where:

  • "DataArea" is the DataArea from which the data is extracted.
  • "NUM|STRING|BOTH" indicates the types of values to be used in the list:
    • NUM indicates that only numeric values are used.
    • STRING indicates that only string values are used.
    • BOTH indicates that both numeric values and string values are used.

    Note: BOTH returns a list of strings, with any numeric values rendered as strings with full precision, if VALUES is used for the VALUES|DimName parameter.

  • "VALUES|DimName" indicates whether data values or symbol names are returned in the list:
  • VALUES returns the actual populated data values as a list of numbers or strings as specified by the NUM|STRING|BOTH parameter.
  • DimName returns the names of the symbols in that dimension as a list of strings, corresponding to the populated data values.
  • "dataspec.lvdsp" is an optional data spec that specifies the subset of the DataArea from which the data is extracted. If not specified, data is extracted from the entire DataArea.
Copy

Syntax example

SET VARIABLE result = CREATELIST("PopulatedData","myWorkspace", "BOTH", "VALUES","dataspec.lvdsp")

The output of the list appears as:

Result= 3.000000000,26.000000000,60.000000000,string1…

Properties

Lists the level-one properties of the specified object. The list is returned as a stringlist. You may use this function against object variables or object properties.

CREATELIST(PROPERTIES, objectVariableName)

CREATELIST(PROPERTIES, objectVariableName.objectPropertyName)

where:

  • objectVariableName is the name of an object variable.
  • objectVariableName.objectPropertyName is the name of an object and specific property.

    Note: You may also specify an object within an array of objects, in the form objectVariableName[index] or objectVariableName.objectPropertyName[index].

Copy

Example

Given the following object:
{ "Name": "A17_06_YTD",
"IsFirst": 0,
"IsLast": 0,
"IsOpen": 0,
"IsPA": 0,
"IsYTD": 1,
    "RelatedPeriod": {
    "YTD": "A17_06_YTD",
    "PA": "A17_06",
    "Open": "A17_Open",
    "Previous": "A17_05_YTD",
    "Next": "A17_07_YTD"
    }
}
SET VARIABLE Result = CREATELIST (PROPERTIES, myObject)

The output of the list appears as:

Result = Name, IsFirst, IsLast, IsOpen, isPA, IsYTD, RelatedPeriod

Server rules

Lists all server rule IDs for the specified rule type.

CREATELIST ("SERVERRULES","RuleType")

Note: The list returns rule numbers, so the variable (List2, in this case) must be declared as type NUM.

where:

  • RuleType is the type of server rule in the list. Select one of the following:

    Value

    Description

    ALL

    To include the ID of all types of server rules.

    EVENT

    To include the ID of event rules only.

    MODELS

    To include the ID of model rules only.

    QUERY

    To include the ID of query rules only.

    ROLLUPS

    To include the ID of rollup rules only.

    VALIDATIONS

    To include the ID of validation rules only.

Copy

Syntax example

CREATE VARIABLE LIST2[] AS NUM
SET VARIABLE List2 = CREATELIST ("SERVERRULES","MODELS")        

The output of the list appears as:

RuleID

Schedules

Lists all schedule names.

CREATELIST ("SCHEDULES")

Copy

Syntax example

SET VARIABLE List1 = CREATELIST ("SCHEDULES")        

The output of the list appears as:

SchedName

Schedule Dimensions

Lists all dimension names for the specified schedule.

CREATELIST ("SCHEDULEDIMENSIONS","SchedName")

where:

  • SchedName is the schedule name.
Copy

Syntax example

SET VARIABLE List1 = CREATELIST ("SCHEDULEDIMENSIONS","PFDETAIL")        

The output of the list appears as:

SchedDimName

Schedule Symbols

Lists all symbol names for the specified schedule dimension in the specified schedule.

CREATELIST ("SCHEDULESYMBOLS","SchedName","SchedDim")

where:

  • SchedName is the schedule name.
  • SchedDim is the name of a dimension defined within the schedule.
Copy

Syntax example

SET VARIABLE List1 = CREATELIST ("SCHEDULESYMBOLS","PFDETAIL","ListItems")        

The output of the list appears as:

SchedSymName

Symbols

Lists all descendent symbol names for the specified dimension.

CREATELIST ("SYMBOLS","Source","DimName","SymName[NumLevels]")

where:

  • Source is either DATABASE or the name of a DataArea.
  • DimName is the dimension in which the symbols reside.
  • SymName is the name of a symbol in the dimension. You can also type ROOT to specify all root symbols in the dimension.
  • NumLevels is a number representing the number of hierarchy levels below SymName.
Copy

Syntax example

SET VARIABLE List1 = CREATELIST ("SYMBOLS","DATABASE","TIMEPER","AYR05#99")        

The output of the list appears as:

SymName

Schedule Symbol Descriptions

Lists the symbol descriptions for the specified schedule dimension in the specified schedule.

CREATELIST("SCHEDULESYMBOLDESCRIPTIONS","SchedName","SchedDim")

where:

  • SchedName is the schedule name.
  • SchedDim is the name of a dimension defined within the schedule.
Copy

Syntax example

SET VARIABLE List1 = CREATELIST ("SCHEDULESYMBOLDESCRIPTIONS ","PFDETAIL","ListItems")        

The output of the list appears as:

SchedSymDesc

Symbol Descriptions

Lists all symbol descriptions for the specified dimension.

CREATELIST ("SYMBOLDESCRIPTIONS","Source","DimName","SymName[NumLevels]")

where:

  • Source is either DATABASE or the name of a DataArea.
  • DimName is the dimension in which the symbols reside.
  • SymName is the name of a symbol in the dimension.
  • NumLevels is a number representing the number of hierarchy levels below SymName.
Copy

Syntax example

SET VARIABLE List1 = CREATELIST ("SYMBOLDESCRIPTIONS ","DATABASE","TIMEPER","AYR05#99")        

The output of the list appears as:

SymDesc

Users

Lists all user names.

CREATELIST ("USERS")

Copy

Syntax example

SET VARIABLE List1 = CREATELIST ("USERS")        

The output of the list appears as:

UserName

Workflows

Lists the active workflow processes. The list is returned as a stringlist.

CREATELIST(WORKFLOWS)

Note: If the Use Workflow server configuration parameter is FALSE, this function will return an empty list.

Copy

Syntax example

CREATE VARIABLE WFProcesses[] AS String 
SET VARIABLE WFProcesses = CREATELIST(WORKFLOWS)        

WorkflowSteps

Lists the workflow steps for a specified Workflow process. The list is returned as a stringlist.

CREATELIST(WORKFLOWSTEPS, Process)

Where:

  • Process is the name of an active Workflow process. If the process name contains spaces, enclose it in double quotation marks (" ").

Note: If the Use Workflow server configuration parameter is FALSE, this function will return an empty list.

Copy

Syntax example

CREATE VARIABLE WFProcessSteps[] AS String 
SET VARIABLE WFProcessSteps = CREATELIST(WORKFLOWSTEPS, MonthEndProcess)        

Published:

CreateList

Use this Longview Application Framework function to return a list of item names to a list variable.

The CreateList function requires the use of Set Variable List to define the variable to which the function will be returning data. See the syntax examples below.

Syntax

The CreateList function can return a list of any of the following items:

List item

Description

Attributes

All Attributes of a particular class in the Data Server repository. For more information, see Attributes.

Columns

Properties of all columns in the specified Data Table.

Note: This does not work on Virtual data tables.

Column Names

A list of column names in the specified Data Table.

Note: This does not work on Virtual data tables.

Dimensions

Dimensions in the Data Server repository. For more information, see Dimensions.

Groups

User groups in the Data Server. For more information, see Groups.

Journal Entry Subcategories

Journal entry subcategories in the Data Server repository. For more information, see Journal entry subcategories.

Populated data

Populated elements in the selected DataArea. For more information, see Populated data.

Properties

Level-one properties of the specified object. For more information, see Properties.

Server rules

Server rules in the Data Server repository. For more information, see Server rules.

Schedules

Schedules in the Data Server repository. For more information, see Schedules.

Schedule Dimensions

Schedule dimensions in the Data Server repository. For more information, see Schedule Dimensions.

Schedule Symbols

Schedule symbols in the Data Server repository. For more information, see Schedule Symbols.

Symbols

Descendent symbols in the Data Server repository. In this case, the CreateList command will return a list of the symbols the user has access to in the specified DataArea. For more information, see Symbols.

Users

User IDs in the Data Server. For more information, see Users.

Symbol Descriptions

Descendent symbol descriptions in the Data Server repository. In this case, the CreateList command will return a list of the symbol descriptions for the symbols the user has access to in the specified DataArea. For more information, see Symbol Descriptions.

Schedule Symbol Descriptions

Schedule symbol descriptions in the Data Server repository. For more information, see Schedule Symbol Descriptions.

Workflows

Active Workflow processes in the Data Server Repository.

WorkflowSteps

Names of workflow steps for a specified Workflow process.

Attributes

Lists all Attributes in the specified Attribute class.

Copy

Syntax

CREATELIST ("ATTRIBUTES","AttrClass")        

where:

  • AttrClass is the Attribute class. Select one of the following:

    Value

    Description

    SYSTEM

    Describes the entire Longview system at the highest level. Attributes of this Attribute class specify system-wide characteristics. There is only one object in the SYSTEM Attribute class, called DBDefault.

    USER

    Describes the Attributes of a particular user. Each user is an object in the USER Attribute class.

    SYMBOL

    Describes the characteristics of individual symbols. Each symbol is an object in the SYMBOL Attribute class.

Copy

Syntax example

CREATE VARIABLE List1[] AS STRING
SET VARIABLE List1 = CREATELIST ("ATTRIBUTES","USER")        

The output of the list appears as:

AttrName

Columns

Lists column information for all columns in the specified Data Table. The list is returned as an OBJECTLIST and lists the column name, Longview column data type, string length (if applicable) and whether the column is nullable for each column.

CREATELIST ("COLUMNS", "dataTableName")

The result will be an object list with the following properties:

  • Name returns the name of the nth column
  • Type returns the Longview column datatype for the nth column. Valid values are:
    • AutoInteger
    • AutoUser
    • Boolean
    • Date
    • Dimension
    • File
    • Integer
    • Number
    • String
    • Symbol
    • User
    • UserList
  • StringLength returns the string length of the nth column, if applicable
  • Nullable returns whether or not the nth column is nullable. Valid values are:
    • TRUE
    • FALSE
Copy

Syntax example

SET VARIABLE ObjectList1 = CREATELIST ("COLUMNS", "SalaryTable")        

The output of the object list appears as:

EmpID, Number, 0, FALSE

FirstName, String, 256, TRUE

LastName, String, 256, TRUE

Position, String, 256, TRUE

Manager, String, 256, TRUE

HireDate, Date, 0, TRUE

Salary, Number, 0, TRUE

ColumnNames

Lists all columns in the specified Data Table. The list is returned as a STRINGLIST.

CREATELIST ("COLUMNNAMES", "dataTableName")

Copy

Syntax example

SET VARIABLE List1 = CREATELIST ("COLUMNNAMES", "SalaryTable")        

The output of the list appears as:

EmpID, FirstName, LastName, Position, Manager, HireDate, Salary

Dimensions

Lists all dimensions in the database.

CREATELIST ("DIMENSIONS")

Copy

Syntax example

SET VARIABLE List1 = CREATELIST ("DIMENSIONS")        

The output of the list appears as:

DimName

Groups

Lists all user groups.

CREATELIST ("GROUPS")

Copy

Syntax example

SET VARIABLE List1 = CREATELIST ("GROUPS")        

The output of the list appears as:

User Group

Journal entry subcategories

Lists Journal entry subcategory information in a variable of type STRINGLIST or OBJECTLIST.

CREATELIST ("JESUBCATEGORIES")

Copy

Syntax example

CREATE VARIABLE List1[] AS OBJECT
SET VARIABLE List1 = CREATELIST ("JESUBCATEGORIES")            

The result will be a list of strings or objects with the following properties:

  • ID returns the subcategory ID
  • Name returns the description of the subcategory
  • Category returns either "STANDARD" or "ELIMINATION"
  • ScheduleName retruns the schedule name, if applicable
  • Reclassification returns 1 or 0.

Populated data

Lists the populated elements in the specified DataArea. Populated data excludes zeros and null values.

CREATELIST ("PopulatedData", "DataArea", "NUM|STRING|BOTH", "VALUES|DimName"[, "dataspec.lvdsp"])

where:

  • "DataArea" is the DataArea from which the data is extracted.
  • "NUM|STRING|BOTH" indicates the types of values to be used in the list:
    • NUM indicates that only numeric values are used.
    • STRING indicates that only string values are used.
    • BOTH indicates that both numeric values and string values are used.

    Note: BOTH returns a list of strings, with any numeric values rendered as strings with full precision, if VALUES is used for the VALUES|DimName parameter.

  • "VALUES|DimName" indicates whether data values or symbol names are returned in the list:
  • VALUES returns the actual populated data values as a list of numbers or strings as specified by the NUM|STRING|BOTH parameter.
  • DimName returns the names of the symbols in that dimension as a list of strings, corresponding to the populated data values.
  • "dataspec.lvdsp" is an optional data spec that specifies the subset of the DataArea from which the data is extracted. If not specified, data is extracted from the entire DataArea.
Copy

Syntax example

SET VARIABLE result = CREATELIST("PopulatedData","myWorkspace", "BOTH", "VALUES","dataspec.lvdsp")

The output of the list appears as:

Result= 3.000000000,26.000000000,60.000000000,string1…

Properties

Lists the level-one properties of the specified object. The list is returned as a stringlist. You may use this function against object variables or object properties.

CREATELIST(PROPERTIES, objectVariableName)

CREATELIST(PROPERTIES, objectVariableName.objectPropertyName)

where:

  • objectVariableName is the name of an object variable.
  • objectVariableName.objectPropertyName is the name of an object and specific property.

    Note: You may also specify an object within an array of objects, in the form objectVariableName[index] or objectVariableName.objectPropertyName[index].

Copy

Example

Given the following object:
{ "Name": "A17_06_YTD",
"IsFirst": 0,
"IsLast": 0,
"IsOpen": 0,
"IsPA": 0,
"IsYTD": 1,
    "RelatedPeriod": {
    "YTD": "A17_06_YTD",
    "PA": "A17_06",
    "Open": "A17_Open",
    "Previous": "A17_05_YTD",
    "Next": "A17_07_YTD"
    }
}
SET VARIABLE Result = CREATELIST (PROPERTIES, myObject)

The output of the list appears as:

Result = Name, IsFirst, IsLast, IsOpen, isPA, IsYTD, RelatedPeriod

Server rules

Lists all server rule IDs for the specified rule type.

CREATELIST ("SERVERRULES","RuleType")

Note: The list returns rule numbers, so the variable (List2, in this case) must be declared as type NUM.

where:

  • RuleType is the type of server rule in the list. Select one of the following:

    Value

    Description

    ALL

    To include the ID of all types of server rules.

    EVENT

    To include the ID of event rules only.

    MODELS

    To include the ID of model rules only.

    QUERY

    To include the ID of query rules only.

    ROLLUPS

    To include the ID of rollup rules only.

    VALIDATIONS

    To include the ID of validation rules only.

Copy

Syntax example

CREATE VARIABLE LIST2[] AS NUM
SET VARIABLE List2 = CREATELIST ("SERVERRULES","MODELS")        

The output of the list appears as:

RuleID

Schedules

Lists all schedule names.

CREATELIST ("SCHEDULES")

Copy

Syntax example

SET VARIABLE List1 = CREATELIST ("SCHEDULES")        

The output of the list appears as:

SchedName

Schedule Dimensions

Lists all dimension names for the specified schedule.

CREATELIST ("SCHEDULEDIMENSIONS","SchedName")

where:

  • SchedName is the schedule name.
Copy

Syntax example

SET VARIABLE List1 = CREATELIST ("SCHEDULEDIMENSIONS","PFDETAIL")        

The output of the list appears as:

SchedDimName

Schedule Symbols

Lists all symbol names for the specified schedule dimension in the specified schedule.

CREATELIST ("SCHEDULESYMBOLS","SchedName","SchedDim")

where:

  • SchedName is the schedule name.
  • SchedDim is the name of a dimension defined within the schedule.
Copy

Syntax example

SET VARIABLE List1 = CREATELIST ("SCHEDULESYMBOLS","PFDETAIL","ListItems")        

The output of the list appears as:

SchedSymName

Symbols

Lists all descendent symbol names for the specified dimension.

CREATELIST ("SYMBOLS","Source","DimName","SymName[NumLevels]")

where:

  • Source is either DATABASE or the name of a DataArea.
  • DimName is the dimension in which the symbols reside.
  • SymName is the name of a symbol in the dimension. You can also type ROOT to specify all root symbols in the dimension.
  • NumLevels is a number representing the number of hierarchy levels below SymName.
Copy

Syntax example

SET VARIABLE List1 = CREATELIST ("SYMBOLS","DATABASE","TIMEPER","AYR05#99")        

The output of the list appears as:

SymName

Schedule Symbol Descriptions

Lists the symbol descriptions for the specified schedule dimension in the specified schedule.

CREATELIST("SCHEDULESYMBOLDESCRIPTIONS","SchedName","SchedDim")

where:

  • SchedName is the schedule name.
  • SchedDim is the name of a dimension defined within the schedule.
Copy

Syntax example

SET VARIABLE List1 = CREATELIST ("SCHEDULESYMBOLDESCRIPTIONS ","PFDETAIL","ListItems")        

The output of the list appears as:

SchedSymDesc

Symbol Descriptions

Lists all symbol descriptions for the specified dimension.

CREATELIST ("SYMBOLDESCRIPTIONS","Source","DimName","SymName[NumLevels]")

where:

  • Source is either DATABASE or the name of a DataArea.
  • DimName is the dimension in which the symbols reside.
  • SymName is the name of a symbol in the dimension.
  • NumLevels is a number representing the number of hierarchy levels below SymName.
Copy

Syntax example

SET VARIABLE List1 = CREATELIST ("SYMBOLDESCRIPTIONS ","DATABASE","TIMEPER","AYR05#99")        

The output of the list appears as:

SymDesc

Users

Lists all user names.

CREATELIST ("USERS")

Copy

Syntax example

SET VARIABLE List1 = CREATELIST ("USERS")        

The output of the list appears as:

UserName

Workflows

Lists the active workflow processes. The list is returned as a stringlist.

CREATELIST(WORKFLOWS)

Note: If the Use Workflow server configuration parameter is FALSE, this function will return an empty list.

Copy

Syntax example

CREATE VARIABLE WFProcesses[] AS String 
SET VARIABLE WFProcesses = CREATELIST(WORKFLOWS)        

WorkflowSteps

Lists the workflow steps for a specified Workflow process. The list is returned as a stringlist.

CREATELIST(WORKFLOWSTEPS, Process)

Where:

  • Process is the name of an active Workflow process. If the process name contains spaces, enclose it in double quotation marks (" ").

Note: If the Use Workflow server configuration parameter is FALSE, this function will return an empty list.

Copy

Syntax example

CREATE VARIABLE WFProcessSteps[] AS String 
SET VARIABLE WFProcessSteps = CREATELIST(WORKFLOWSTEPS, MonthEndProcess)        

For an optimal Community experience, Please view on Desktop