If you say "Instead it takes the corresponding value from the script", that means that you are setting the same variable in the script as well, thereby always overriding the value passed as a parameter. Using variables to pass values is tricky stuff.
A solution to this can be as follows:
- In your document, clear the value of your variable in Settings->Variable Overview
- At the end of your script, add a line like: LET vImport_Document_Path = ''; That will make sure that at the start of the next reload, the variable exists (necessary for passing parameter values) and contains nothing (see further)
- Now in your script (probably at the beginning) make the assignment of a default value to your variable conditional. Only set the variable if it is empty (meaning that no value has been passed from QDS). You can use a test like
IF '$(vImport_Document_Path)' = '' THEN ...