Can I create custom user variables and use them in file paths or snippets?

Video demo

The features described in this page require QAP v9.2 or more recent.

User variables can be of great help in various situations:

  • network drive users having to enter long (and often cryptic) paths to reach their content can shorten these paths using convenient variable names;
  • if you use a Shared menu of type Personal on two different computers sharing the same cloud drive (like Dropbox), user variables like {Dropbox} allow you to have fix favorites paths in your menu even if your cloud drive is at different locations on your two systems;
  • this is the same for teams using shared menus and cloud drives; favorites in shared menus for folders or files on a cloud drive will work regardless the cloud drives location on each team member PCs;
  • if you plan to move your files to another location, you can use a variable to avoid having to edit all the favorites after you moved the files to the new location;
  • etc.

To manage your user variables, open the Options window in the More tab and click the User Variables button. In this window, enter your user variables, one by line. Each line must start with the variable name between curly brackets (e.g. {MyVariable}), followed by the equal sign = and the variable content (e.g. {MyVariable}=MyContent).

For example, if one line contains {OurSharedFolder}=S:\ThisFolder, the placeholder {OurSharedFolder} will be replaced by S:\ThisFolder in a favorite paths when launching it or in snippet's content when pasting it.

In the following example, the user variable {OneDrive} is inserted in the favorite folder {OneDrive}\Project. If the variable contains C:\Users\Standard\OneDrive as in the previous example, the Project folder will be opened in C:\Users\Standard\OneDrive\Projects.

Note 1: The first time you launch it, QAP tries to create user variables for these commonly used cloud drives if they are found on the system: {Dropbox}, {OneDrive}, {GoogleDrive} and {iCloudDrive}.

Note 2: If you need to insert a user variable "as-is" in a text snippet, precede the variable's opening bracket with a backtick, eg.: `{Dropbox}.

See also: Can I insert values in favorites location or parameters using placeholders?

Please use the new QAP Support Google Group to ask questions or post comments.