Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello All,
This thread covers some of the most subtle, but also one of the most consistently nagging adverse effects on Qlik development.
I've tried to develop a habit of always including the '=' equal sign before all expressions, and wrapping variables with the $().
Oftentimes however I am lured into a sense of syntax complacency, when omitting the equal sign or not wrapping the variable will still allow correct expression interpretation. Then eventually at some later juncture, this syntax is disrupted and the expressions revert to requiring leading '=' and the $() variable wrapping before functionality resumes.
The good news is that playing it safe and always using the "long form" of expression syntax doesn't seem to revert.
So in this particular case, I have an application that is using color variables.The variable assignment was an RGB syntax without the leading equal sign, Lets call this variable MyColorVar
RGB(100,100,100)
This variable was then used throughout the QlikView application in color expressions, with the following exact syntax:
=MyColorVar
*Note: the expression has the leading equal sign, but not the $() wrapper
Usage of this expression worked fine in:
However, the color expressions suddenly all stopped interpreting after a QMC task generated distribution copy.
I took a before and after copy of the application, and did full project exports, doing text comparison of the project files, and differences were detected in 4 files:
It detected the desktop version of QV11.2 SR 12 vs. the earlier QV Server version desktop: <SavedByVersion>11.20.12904.0409</SavedByVersion> QMC: <SavedByVersion>11.20.12852.0409</SavedByVersion>
Every other project file is identical, all the color expression syntax, the variable values, the DocBinary.dat.
But when I open the before and after copies of the .QVW, the colors of the objects are different. It appears the color expressions in the QMC generated distribution .QVW are failing, and objects with color expressions are reverting to the 'Fixed' colors assigned.
I can "repair" the application, by going back and wrapping all the variables with the $() wrapper, then the QMC version that is churned out is ok, but the idea the necessity of the $() wrapper can be "toggled" circumstantially I'm sure should be well understood.
Any ideas?