Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello;
I'm trying reload a QVW file with the Binary sentence. But I need change the qvw file depending on the value of a variable.
I tried many things but I didn't success.
The script I have is soemthing like this:
IF vR=0 THEN
Binary [\\PATH\QLIKVIEW.qvw];
ELSE
Binary [\\PATH\QLIKVIEW2.qvw];
ENDIF
If I run this script I have this error message:
Unknown Sentence
Binary [\\PATH\QLIKVIEW.qvw]
If I run the script without the IF condition goes well.
I tried include the sentence in a text file and call it by: $(Must_Include=..\Scripts\Script1.txt);
This didn't go well.
I hope someone knows what I'm doing wrong. Is not valid writing poor English 🙂
Thanks,
Fernando
Was anyone able to get the variable used in a binary working? I keeping getting an error.
The value for my variable is: =if(ComputerName()='ABC','v:\models\modelRevenue.qvw','v:\models\modelRevenue.qvw')
My binary statement: binary $(vbinarypath);
If I change my variable to just be the file path/name it works fine.
Any help is appreciated.
If you run your script in debug mode, to what statement is your first line with the dollar sign expansion expanded?
What is the error message you get?
When I click Debug the following error immediately comes up:
Cannot open file 'W:\applications\00.DirectPublished\Revenue\=if(ComputerName()='ABC','v:\models\modelRevenue.qvw','v:\models\modelRevenue.qvw')'
binary =if(ComputerName()='ABC','v:\models\modelRevenue.qvw','v:\models\modelRevenue.qvw')
Seems like your variable is expanded to the expression, not to the evaluated value.
(and I think that's how it's done when you call the variable from the script context)
Maybe Fernando can clarify how he's done the implementation.
Hi,
The above is not working. I am creating a variable from the variable overview and using that in the binary load statement. But, the variable expression does not get evaluated and in Binary load statement, it gives me the error because it is not taking the expression as a string instead of it's evaluated value.