Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Issues with Alternate State and Variables

Hello!

We are facing some issues when using Alternate State and Variables,

We have a chart that uses vMaxAño variable and uses alternate states. We also have a listbox for selecting years (2013, 2014 and 2015)

When selecting a year sometimes the varible vMaxAño fails to update its value so if we select for instance 2013 the variable value remains in 2015 for some odd reason.

When minimizing the chart there doesn't seem to be a problem with the variable's value. We added a text object that shows vMaxAño variable value. As you can see, we selected 2013 but the text box shows 2015. We have made several tests but we can't  figure out what is going on

Is this a normal or expected behaviour when using alternate states and variables?

printscreen1.JPG

We have attached a simple demo that presents the issue. You have to select the year (Año) a few times till it randomly fails

16 Replies
Not applicable
Author

I am also finding this issue in one of my apps. How can we bump this to get answered?

SergeyMak
Partner Ambassador
Partner Ambassador

Hi David,

If you share your app or an example I will be happy to help.

It's hard to say what's wrong without the actual app with the issue

Regards,
Sergey

Regards,
Sergey
Not applicable
Author

Thanks Sergey, I have attached an app that should illustrate the issue. There seems to be inconsistent handling of the variable when it is used in an on-screen object in an alternate state via a $-expansion.

Not applicable
Author

Hey Sergey,

I tested more today and updated the app with my observations and a better method to reproduce the issue. I still have not found a reliable way to reproduce the issue (it is very inconsistent), so you may need to poke around quite a bit to reproduce it. Instructions are in the app.

Thanks for your attention on this.

rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

I can't reproduce the problem, but I do think you have too many equal signs defined. Perhaps that is a consequence of a simplified example, maybe not.

When you define the variable with an "=", it's value is calculated only once, in the default context. In this case

When you reference it with $(), you are causing the value (a number in this case) to be evaluated again. Then the "=" within the $() causes it be evaluated again. So three evaluations at different times. Again not sure how this relates to your real world app, but I could see it causing potential confusion.

-Rob

rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

Interesting. Your second example is clearer. I can reproduce on QV11 SR13, but I can't reproduce on QV12.

-Rob

SergeyMak
Partner Ambassador
Partner Ambassador

Hi David,

I've created your vCase1 like that

=If(Only({$}user_name) = 'David', 100

, If(Only({$}user_name) = 'Jonathan', 200

, If(Only({$}user_name)='Robert',300)))

and have no issues, but old version is still affected.

Regards,

Sergey

Regards,
Sergey
Not applicable
Author

FYI - I got this escalated to Qlik technical support. Here is their reply:

I am reaching out to you to let you know that I heard back from R&D on this bug.  R&D recognizes that this is an actual deficiency.  However, as the issue is fixed in QlikView 12.0 and the high level of risk involved in implementing a fix for it in the 11.2 version of the product, they have decided not to fix this bug in the 11.2 version of the product.

So this was accepted as an actual bug in the software, but since this was fixed in version 12.0, no action will be taken to remedy this.

Not applicable
Author

Hi,

i'm facing the same issue in QV 12.1. In 11.2 SR7 it worked well, and now i have no solution in   QV 12.1

EDIT:
wow ok, it seems the bug came back.

qv12.1 SR 6 =Same issue

qv12.1 SR 3 =Same issue

qv12.1 SR 2 =Same issue

qv12.1 SR 1 =Same issue

qv12.0 SR 5 =Same issue

qv12.0 SR1 =everything works well

qv12.0 SR4 =everything works well

so qv12.0 SR4 seems to be the last version without this issue