# EsbListVariables

Description

EsbListVariables() lists all substitution variables that conform to the input criteria.

Syntax

    EsbListVariables (hCtx, pVariable, pItems)

    ByVal hCtx      As Long
          pVariable As ESB_PVARIABLE_T
          pItems    As Integer

Parameters

hCtx | Context handle to the Essbase API.
pVariable | The pointer to the structure containing the description of the substitution variables being listed. Except for the VarValue member which is ignored, exact pattern matches take place using the remaining fields. If a field is empty, then that field is treated as a "don’t care."
pItems | The pointer to an unsigned long value indicating the number of variables being returned in the ppVarList parameter.

Return Value

If successful returns zero (0).

Example

    Declare Function EsbListVariables Lib "esbapin" (ByVal hCtx As Long, pVariable As ESB_VARIABLE_T, pItems As Integer) As Long
    Public Sub ESB_ListVariables ()
       Dim i As Integer
       Dim nCount As Integer
       Dim sts As Long
       Dim oVariable As ESB_VARIABLE_T
       oVariable.AppName = "Sample"
       sts = EsbListVariables(hCtx, oVariable, nCount)
       If sts = 0 Then
          If nCount <> 0 Then
             For i = 1 To nCount
                sts = EsbGetNextItem(hCtx, ESB_VARIABLE_TYPE, oVariable)
                Debug.Print "Variable Name: " & oVariable.VarName
                Debug.Print "Value: " & oVariable.VarValue
                Debug.Print
             Next
          Else
             MsgBox "No substitution variables found."
          End If
       Else
          MsgBox "Error listing substitution variables."
       End If
    End Sub

See Also

ESB_VARIABLE_T
EsbCreateVariable()
EsbDeleteVariable()
EsbGetVariable()