Home Search

DriveWorks Pro 22
SppGetVariablesInCategory

Send Feedback

SppGetVariablesInCategory

Returns an array of variables in a specified category.

Syntax

SppGetVariablesInCategory([Category Path],[Include Sub Categories])

Where:

Category Path is the path of the Variable Category.

Include Sub Categories is TRUE to include Variables from Sub Categories, FALSE to omit.

Example

Consider the category structure in the image below:

RuleMeaningResult
SppGetVariablesInCategory("Category A",TRUE){"Variable Name","Variable Rule","Variable Value","Comment","Category Path";"Variable2","","","","Category A";"Variable3","","","","Category A";"Variable4","","","","Category A\Sub Category AA";"Variable5","","","","Category A\Sub Category AA";"Variable6","","","","Category A\Sub Category AA";"Variable7","","","","Category A\Sub Category AB";"Variable8","","","","Category A\Sub Category AB";"Variable9","","","","Category A\Sub Category AB"}Will return an array of all variables in the category Category A, including variables from sub categories.
SppGetVariablesInCategory("Category A",FALSE){"Variable Name","Variable Rule","Variable Value","Comment","Category Path";"Variable2","","","","Category A";"Variable3","","","","Category A"}Will return an array of all variables in the category Category A only.

Results in Tabular Format

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

Results in the Variable Rule, Variable Value and Comment columns have been removed for clarity

Variable NameVariable RuleVariable ValueCommentCategory Path
Variable2Category A
Variable3Category A
Variable4Category A\Sub Category AA
Variable5Category A\Sub Category AA
Variable6Category A\Sub Category AA
Variable7Category A\Sub Category AB
Variable8Category A\Sub Category AB
Variable9Category A\Sub Category AB

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

Results in the Variable Rule, Variable Value and Comment columns have been removed for clarity
Variable NameVariable RuleVariable ValueCommentCategory Path
Variable2Category A
Variable3Category A