Variables
Overview
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.
Variables page
To view a list of all variables currently available in PDQ Connect, click Variables from the left navigation. The resulting page will display three columns that represent the different properties that make up a variable.
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 occurs when a user creates a custom variable and PDQ later adds a variable with the same name; in this case, both remain available.
- Variable names cannot be changed once created. To change a variable's name, create a new variable 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 everywhere the variable is used.
- Regular expressions (regex) are not currently supported in variables. Any regex syntax is treated as a literal string.
- Type: Identifies whether the variable is custom or was created by PDQ.
- PDQ Connect comes with over 2,000 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 useful for identifying out-of-date patches and software, since the user doesn't need to update those manually to keep groups accurate.
Custom Variables
Create a custom variable
To create a custom variable, click Create variable at the top right of the Variables page. Give the variable a name and value, then click Create.
Edit or delete a custom variable
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 you attempt to delete it, you'll receive a message asking you to remove it from the filter before deleting.
Keep in mind that a variable's name can't be changed after it's created, only its value. To rename a variable, create a new one to replace it.
Any user with the "Manage custom variables" permission can delete or modify any custom variable, regardless of who created it. 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 the 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 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. In the Result filters section, click Add filter. 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 following screenshot shows a software report filtered to display only outdated TeamViewer versions.