Placeholder reference
Back to the function reference.
Placeholder Reference
The value parameter in supported commands can include placeholders that are replaced with actual values based on the current context. The placeholders differ slightly depending on whether the backing object is a file or a folder.
Placeholders for Files
$value: Existing value of the variable. If the existing value is null or empty, this evaluates to an empty string.$name: The file name with extension.$fileName/$filename: The file name with extension.$fileNameWithoutExtension: The file name without extension.$nameWithoutExtension/$namewithoutextension: The file name without extension.$extension: The file extension.$id: The file ID.$revision: The current revision of the file (PDM revision, not the PDM variable).$version: The current version of the file.$state: The current workflow state name of the file.$stateID: The current workflow state ID of the file.$workflow: The workflow name for the file's current state.$workflowID: The workflow ID for the file's current state.$filePath: The full local path of the file.$localPath: The full local path of the file.$completefilename: Legacy full local path of the file.$folderPath: The full local path of the folder containing the file.$directory: The full local path of the folder containing the file.$completefoldername: Legacy full local path of the folder containing the file.$folderName: The name of the folder containing the file.$folderID: The folder ID.$configuration: Configuration used by BOM, or supplied by a card-button, serial-number, or task event.$(Variable.@): PDM file variable value from the file@tab. Use.@to request that configuration explicitly.$(Variable.Configuration): PDM file variable value from an explicit configuration tab.
Placeholders for Folders
$value: Existing value of the variable. If the existing value is null or empty, this evaluates to an empty string.$folderName: The name of the parent folder.$folderID: The folder ID.$folderPath: The full local path of the folder.$directory: The full local path of the folder.$filePath: The full local path of the folder when the current context is a folder.$localPath: The full local path of the folder.$completefoldername: Legacy full local path of the folder.$(Variable): PDM variable value using the default folder configuration.$(Variable.Configuration): PDM variable value from an explicit configuration.
Common Placeholders (Applicable to Both Files and Folders)
$username: The name of the logged-in PDM user.$username.firstName: The logged-in PDM user's first name when available.$username.lastName: The logged-in PDM user's last name when available.$username.FullName: The logged-in PDM user's full name when available.$username.email: The logged-in PDM user's email address when available.$vaultName: The name of the vault.$vaultnameis also supported for compatibility.$vaultRootFolder: The local root folder of the logged-in vault.$vaultrootfolderis also supported for compatibility.$GUID/$guid: Unique identifier for the evaluation context.$taskName: Task name when a task context is available.$tempFolder/$TempFolder: User's local temporary folder.$machineName/$computerName: Windows machine name.$windowsUser: Windows user name.$userDomain/$domain: Windows user domain.$yyyy/$year: The current four-digit year.$yy: The current two-digit year.$MM/$mm: The current month (two digits).$M: The current month.$dd: The current day of month (two digits).$d: The current day of month.$month: Full month name.$mon: Short month name.$day: Full day name.$dayShort: Short day name.$HH/$hh: The current hour (24-hour clock).$mi: The current minute (two digits).$ss: The current second (two digits).$tt: AM/PM designator.$timestamp: Timestamp inyyyyMMdd_HHmmssformat.$date: The current date.$time: The current time in the current locale.
Authored \n sequences can format messages as new lines, including results of pure string functions. Paths and text obtained from event data, globals, or resolved file IDs remain literal rather than being parsed again as command syntax. Path handling remains command-specific.
Event and workflow transition placeholders
Use $fromState, $fromStateID, $toState, $toStateID, $transition, $transitionID, and the complete event placeholder reference. These read the current item's original callback snapshot, not another selected file or its later live state. Unavailable event values are empty. These suggestions appear in script editors, condition dialogs, and the expression evaluator, but not in the bottom interactive command box.
PDM variable expressions use $(VariableName) or $(VariableName.ConfigurationName). Bracketed text is treated as literal text, so folder and file paths such as [debugging] are not interpreted as variables.
Use an explicit suffix when the configuration matters: $(Description.@), $(Revision.@), or $(PartNo.Default). Without a suffix, $(VariableName) uses @ for .sldprt and .sldasm files and an empty configuration for other files and folders. Bracket-style variable syntax is no longer evaluated.
Global Variables
Session global variables use the ${global.Name} syntax. They are set with setglobal, printed with getglobal, and cleared with clearglobal.
setglobal -name Project -value "ABC-100"
rename -filePath "$localPath" -value "${global.Project}-$name"
setvar -variableName Description -filePath "$localPath" -value "${global.Project} - $value"
Global variables are temporary and last only for the current PDMShell session or script run. See Global Variables.
Selected-item runs evaluate globals and nested expressions with the active session for each item and line. Nested scripts retain the calling item's event context. until reevaluates its condition on each poll instead of freezing the condition's globals at the start.
Using PDM Variables in Placeholders
For answers collected when a PDM task launches, use ${task.Name}. These values belong to that task instance and are separate from globals and PDM card variables. Configure them on the Task inputs page.
To read a particular folder's card from a file-based script, use ${folderVariable("C:/Vault/Project", "Title")}. See folder card variables.
In addition to named placeholders, you can include PDM variables with $() expressions.
$(Revision.@)
$(Description.@)
$(PartNo.Default)
For file variables, include the configuration suffix. Use .@ for the file @ tab.
Bracket syntax is not evaluated. Anything between [ and ] remains literal text.