Conditions
The Conditions section controls whether a script should run for the current file, folder, or command context.
Conditions use the shared PDMShell condition syntax. See Conditions for the full reference.
From 4.1.1, vault scripts opened in the main PDMShell editor use the same text Conditions dialog as IF and until. Write expressions directly, combine them with AND or OR, and group them with parentheses. Press Ctrl+Space for functions, placeholders, operators, and the connected vault's data-card variables.
Open a vault script, then choose Script settings > Triggers > Edit conditions (N)…. The larger button displays the number of individual rules, not AND/OR groups. Its explanation describes what the gate controls.
View the same settings in the dark theme.
Click Apply conditions to update the draft, then Save in the main toolbar to publish the script and settings. Cancel leaves the saved draft expression unchanged. Opening the editor still requires the original vault connection and Edit add-ins permission.
Syntax is checked automatically. Syntax is correct. Expression not evaluated. means the expression parses, not that the condition is true. Editing never runs prompts, serial-number functions, or vault functions. Use Help for the IF and conditions guide.
A blank vault gate means no condition restriction; permissions and other execution settings still apply. Existing standalone boolean expressions such as ${isCheckedOut()} remain supported. Unlike vault gates, IF and until conditions require a comparison or existence check and cannot be blank.
Note
These are actual WPF captures from the 4.1.1 build using sample data, not live-vault results. Older releases and the legacy PDM-hosted editor may still show the row-based builder.
Supported condition features
andandor- nested groups with parentheses
- file, folder, and process exists checks
- text comparisons such as equals, contains, starts with, ends with, and regex matches
- numeric comparisons
- PDMShell placeholders such as
$fileName,$localPath, and$folderPath - PDM variables such as
$(Description.@)or$(Revision.@)for file@tab values - checkout functions such as
${isCheckedOut()},${isCheckedByMe()},${isCheckedOutByUsername("Admin")}, and${checkedOutOnComputer()}
Comparing a workflow state
$state = "Released", $state == "Released", and $state equals "Released" perform the same case-insensitive text comparison. Put spaces around the operator. A different state or an empty state does not match.
$state equals "Released"
$state is the file's PDM workflow state. It is different from a data-card variable named State, which is read using $(State.@).
Examples
$localPath exists
"$(Description.@)" contains "ECO"
($folderPath\ready.pdf exists or $folderPath\ready.dxf exists) and "$(State.@)" equals "Released"
${isCheckedOut()} and ${isCheckedByMe()}
${isCheckedOutByUsername("Admin", "$filePath")}
For file data card variables, use the explicit configuration suffix. Use .@ for the file @ tab, for example $(Description.@).
Checkout functions are evaluated against each affected file when the menu command, event hook, or task runs. They are available from the Conditions editor autocomplete list. See Checkout state functions for optional file-path forms.
Condition test message
Enable Show condition test messages for troubleshooting. When the script is triggered, it displays whether conditions matched, the expression, resolved values, and affected items. This is a runtime diagnostic, not the syntax-only feedback in the editor. Leave it off for normal use to avoid extra message boxes. The explanation beneath the checkbox summarizes this behavior.