Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
asamariaekrickl
Partner - Contributor III
Partner - Contributor III

Call variable in script

I have a variable containing set analysis code. I then want to call this variable in the load script.

The variable is called vNSWIPALOS and the code looks like this:
if(Sum({$<[LHD/SHN]=,Facility=,LHD=, EncounterTypeCode = {' & chr(39) & I & chr(39) &'}>} Counter_Activity)=0, '',
Sum({$<[LHD/SHN]=,Facility=,LHD=>} IPLOS)
/
Sum({$<[LHD/SHN]=,Facility=,LHD=,EncounterTypeCode = {' & chr(39) & I & chr(39) &'}>} Counter_Activity))

I have added the chr(39) to replace the ' to get it work when I call it from the script.

I can't get the app to reload unless I call the variable using single quotes. 
Like this:
if(IPLOS <= '$(vNSWIPALOS)' / 3 ,Dual('Short',2)
etc etc in the aim to create a new field.

The problem is that that new field comes out empty after the reload instead of containing the value Short etc.

Any ideas what I need to change to get this to work?

Thanks in advance

Asa

Labels (3)
1 Solution

Accepted Solutions
tresB
Champion III
Champion III

Set analysis doesn't work in load script.

View solution in original post

1 Reply
tresB
Champion III
Champion III

Set analysis doesn't work in load script.