Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I am assigning a string value having commas to a variable ,but couldn't achieved expected.
set vVar= "Let vColumn = peek('Column', 0,'Config') ";
output which i am getting -->$(vVar) ="Let vColumn = peek('Column'"
Expected value is $(vVar)= "Let vColumn = peek('Column', 0,'Config') ";
Please advise what am i missing here.
A comma will be always treated as delimiter for a parameter. Therefore it's an expected behaviour - although it would be really desirable to have some logic to mask them.
What's the aim for your approach - why setting a variable-creation within another variable?
- Marcus
A comma will be always treated as delimiter for a parameter. Therefore it's an expected behaviour - although it would be really desirable to have some logic to mask them.
What's the aim for your approach - why setting a variable-creation within another variable?
- Marcus
Hi Durgesh22
for me the code behaves exactly as you expect it. The only unexpected behaviour is, that the variable contains a double hypen after the set statement. But if you execute the variable, it does perfectly what you would expect. In my testdata, the value in the first dataset contains the string PRODUCT1, so everything is fine.
Regards
Dirk
I never tried this before but I could admit that it worked in QlikView, too.
Seems that you have anywhere a small syntax error in your approach. Nevertheless it looked for me more complicated as necessary.
- Marcus
Try something like this:
set vVar= 'Let vColumn = peek(''Column'', 0,''Config'')';