Home Search

DriveWorks Pro 21
SppGetVariableCategories

Send Feedback

SppGetVariableCategories

Returns an array of Project Variable Categories.

Syntax

SppGetVariableCategories([Include Sub Categories])

Where:

Include Sub Categories is TRUE to include Categories that are Sub Categories of a Parent, FALSE to omit.

Example

Consider the category structure in the image below:

The following rules would return the results as shown in the results column:

RuleResultMeaning
SppGetVariableCategories(TRUE){"Category Name","Category Path","Variable Count";"No Category","",1;"Category A","Category A",2;"Sub Category AA","Category A\Sub Category AA",3;"Sub Category AB","Category A\Sub Category AB",3;"Category B","Category B",2;"Sub Category BA","Category B\Sub Category BA",3;"Sub Category BB","Category B\Sub Category BB",3}Will return an Array of all Variable Categories including Sub Categories.
SppGetVariableCategories(FALSE){"Category Name","Category Path","Variable Count";"No Category","",1;"Category A","Category A",2;"Category B","Category B",2}Will return an Array of all top level Variable Categories only.

Arrays In Table Format

The results for the first example above will appear as below when presented in tabular format:

Category NameCategory PathVariable Count
No Category1
Category ACategory A2
Sub Category AACategory A\Sub Category AA3
Sub Category ABCategory A\Sub Category AB3
Category BCategory B2
Sub Category BACategory B\Sub Category BA3
Sub Category BBCategory B\Sub Category BB3

The results for the second example above will appear as below when presented in tabular format:

Category NameCategory PathVariable Count
No Category1
Category ACategory A2
Category BCategory B2