The $1 is intentional as I want to be able to specify which function is called based on a parameter.
For example: If vCalcForXScript is: if($(vTestFor$1), 'Y', 'N');
Then in a chart, the following call would go through the translations:
$(vCalcForXScript(2)) // original call
if($(vTestFor2), 'Y', 'N'); // substitute vCalcForXScript
if((Value=2), 'Y', 'N') // substitute vTestFor2
Alternatively I could use: $(vCalcForXScript(3)) which would use the vTestFor3 variable.
My problem is that if I were to set vCalcForX using the Variable Overview interface, it will work. If I attempt to set vCalcForX in the load script (as per the first post) it translates the variables immediately. (as you pointed out)
I'm looking for a way to set vCalcForX to contain variables without translating them until later.
let vCalcForXScript= 'if($' &'(vTestFor$1),' & chr(39) & 'Y' & chr(39) & ',' & chr(39) & 'N' & chr(39) & ')';
set vT =if(@(vTestFor@1), 'Y', 'N');
let vCalcForXScript = replace('$(vT)', '@','$');
comm81985.qvw 149.2 K