Qlik Community

Qlik Sense Integration, Extensions, & APIs

Discussion board where members can learn more about Integration, Extensions and API’s for Qlik Sense.

Announcements
Qlik® Product Spotlight: Discover what’s possible. Get more from our products.
See for yourself. Register today.
Not applicable

truncated variable via script

Hello,

I am trying to load a set of variable via script. But, loading, it truncates each time a portion of the variable.

The variable load is a formula:

"sum({<TST_ID={0,1},[Type article Art]=-{"S*"},[AAAA DP]={"<=$(=$(vAnnéeInJour)-$1)"}>}[Coût financier Tra])"

In my scrip I tested several methods:

SET [vStock € A-x] ='sum({<TST_ID={0,1},[Type article Art]=-{"S*"},[AAAA DP]={"<=$(=$(vAnnéeInJour)-$1)"}>}[Coût financier Tra])' ;

or

SET [vStock € A-x] =sum({<TST_ID={0,1},[Type article Art]=-{"S*"},[AAAA DP]={"<=$(=$(vAnnéeInJour)-$1)"}>}[Coût financier Tra]) ;

In both cases, it removes the parts of the formula I or reference variables. I ended up with the text:

sum({<TST_ID={0,1},[Type article Art]=-{"S*"},[AAAA DP]={"<="}>}[Coût financier Tra])

Note: If I manually created the variable, it works flawlessly.

Does anyone know how to get around this?

thank you in advance

Tags (2)
1 Solution

Accepted Solutions

Re: truncated variable via script

The issue is with Dollar sign getting evaluated in the script... try this approach mentioned by Stefan here:

Re: Expression as a variable with $-sign expansion

1 Reply

Re: truncated variable via script

The issue is with Dollar sign getting evaluated in the script... try this approach mentioned by Stefan here:

Re: Expression as a variable with $-sign expansion