Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
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 (2)
1 Solution

Accepted Solutions
tresesco
MVP
MVP

Set analysis doesn't work in load script.

View solution in original post

1 Reply
tresesco
MVP
MVP

Set analysis doesn't work in load script.