Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
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

1 Solution

Accepted Solutions
sunny_talwar

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

View solution in original post

1 Reply
sunny_talwar

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