Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Did Qlik Cloud change anything this last month regarding variables created in load editor which are used in frontend?
For example, variables created in load editor:
Let vFoobar = 'Foobar';
Let vName = 'John Doe';
Let vEmpty = '';
... are suddenly not working in frontend anymore:
Name: vFoobar
Definition: Foobar
Value: -
Name: vName
Definition: John Doe
Value: Error: Garbage after expression: 'Doe'
Name: vEmpty
Definition:
Value: Error: Invalid or Empty expression.
Before, value was identical to its definition for string variables. But now I get these errors. This new behavior is breaking my apps. Is no one else having this issue? I couldn't find any information about this in the community.
Hi @_ingo_,
Try using Set instead of Let.
Let will evaluate the String while Set will just assign it.
It was only an example. I know that for simple strings I could have used Set instead of Let. But even after using Set nothing changed. I still get the errors.
My apps that were working fine, aren't anymore. It looks like Qlik changed something when importing backend variables into the frontend.
I think that's a bug. Previously variables were only evaluated if the Definition started with "=". That's how client-managed works. I suggest contacting Qlik Support.
-Rob
Okay.
Where in the Frontend are you getting these errors? By your description I'd guess in the expression Editor?
If so: Are you using the variables with or without the $-sign? I.e vName vs $(vName)
I'm seeing these errors in the "Variables" window. See attachment.
I've done some testing and it appears that only the "Value" in the Variables window has changed. A reference to the variable in a measure like "$(vSales)" still pulls in the Definition -- not the value -- and it all works.
So not a bug, just a UI change?
-Rob
I have to dig deeper. I just know that my simple WriteBack solution, which sends variables via partial reload to the backend and then again back to the frontend, is not working properly anymore. I was assuming that this issue is behind it, but I'm not sure yet.
But still, this change, if intentional, was imo a bad decision. I would still expect to see the correct value of the variable (if it's not an expression) and not an ugly error message.
Thanks for the feedback and testing.
I agree it's an unwelcome change. It changes the semantic meaning of "Value"..
"Value" was the value of the variable. The value I would expect to see if I referenced the variable as "=varname". Now "Value" in the Variable overview is something different. It's the evaluated result of the variable -- what I would expect to see if I referenced the variable as "=$(varname)".
The previous method made it very clear to quickly understand the result of including "=" in he variable Def.
-Rob
it would yield the same results but i would rather do
Set vFoobar = 'Foobar';
Set vName = 'John Doe';
Set vEmpty = '';
OR
Let vFoobar = text('Foobar');
Let vName = text('John Doe');
Let vEmpty = chr(32);
as LET
statement is used to evaluate an expression and assign the result to a variable. and SET
statement is used to assign a string value directly to a variable without evaluating the expression on the right-hand side.