Working with Variables

PDQ Connect supports the use of variables to store values that may be referenced in groups and reports. Variables prove beneficial when a recurring value, such as an application version, needs to be updated in multiple locations at once. 

Viewing Variables

To view a list of all variables currently available in PDQ Connect, click the "More" button on the left navigation menu and then click "Variables" from the dropdown. The resulting page will display three columns that represent the different properties that make up a variable. 

Overview of Properties:

  • Name: The friendly display name of the variable visible when selecting from a list.
    • Variable names must be unique, and two variables cannot have the same name at once. The one exception to this case occurs when a user creates a custom variable and then PDQ adds a variable with the same name at a later date. In this case, both will be available.
    • Variable names cannot be changed once they are created. In order to change a variable name, a new variable needs to be created to replace the existing one. 
  • Value: The data used by Connect when referencing a variable in filters. 
    • The same value may be used in multiple variables. 
    • When a value is changed, it updates the value in every location that the variable is used.
    • Regular expressions (regex) are not currently supported in variables. Any regex syntax will be treated as a literal string. 
  • Type: Identifies if the variable is custom or was created by PDQ.  
    • PDQ Connect comes with over 350 prebuilt variables that are maintained by PDQ. 
    • All variables provided by PDQ are updated by the PDQ Packaging Team to stay current with application updates and version changes. 
    • PDQ prebuilt variables can be highly useful for identifying out-of-date patches and software, as the user does not need to update those themselves to keep the groups accurate.

Custom Variables

To create a custom variable, click "Create variable" at the top right of the variables page. Give the variable a name and value, then hit create. You can delete or edit a custom variable at a later time using the vertical ellipsis to the right of the variable. If a custom variable is in use by a filter when attempting to delete it, the user will receive a message requesting that it be removed from the filter before deleting. 

It should also be noted that any user with the "Manage custom variables" permission may delete or modify any custom variable, regardless of who created it. However, PDQ provided variables cannot be modified or deleted. 

Using Variables in Groups

To use a variable in a group or filter, click the (x) button in the right-hand text box. This will bring up a list of all available variables that may be searched or scrolled through. Variables when viewed this way will always be enclosed in parentheses prefaced with a $ sign.

To view the value of a variable without navigating away from the current page, mouseover any variable in the list and note the value displayed to right. Once located, click on the desired variable to add it to the text field for use in the filter. 

 

Important: You must select the variable from the dropdown in order for it to work properly in the filter. Manually typing $(VariableName) in the text box will result in a literal interpretation of the text and instead of referencing the variable.  

Using Variables in Reports

Variables can be used to narrow the results of a report beyond what may be accomplished by targeting a device group. To add a filter to a report, navigate to the Reports tab and create or edit a report, then select “Add filter” under “Result filters.” Working with filters here is similar to doing so from a device group, except the contents of the report will be narrowed instead of a list of devices. For example, you can filter a software report to only show outdated versions of Teamviewer instead of all installed applications. The screenshot below illustrates this example.

Still have a question or want to share what you have learned? Visit our Community to get help and collaborate with others.