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: 
zagzebski
Creator
Creator

Set Variable action not working as expected

Wondering if anybody has experience the following before as I haven't.

I have a text box with the following actions with the default of vCustPremium set to "0".

1. Clear Customer field

2. Set Customers field: Premium Greater than 1000

3. Set Variable vCustPremium to:  If(GetSelectedCount(Customers)=0,1,0)

My problem is that the first time I click on the text box even though after the 2nd action there are no fields with Premium greater than 1000, it still keeps vCustPremium = 0. However when I click it a second time it correctly sets the vCustPremium = 1.

Why do I have to click the button twice to get the variable to set to 1?

Thanks in advance,

Zag

15 Replies
PabloOrtiz
Partner - Creator
Partner - Creator

Hi, please attach an .qvw example.

tamilarasu
Champion
Champion

Zagzebski,

   Yes. I too faced the issue once and that happened randomly. I am too curious to know the reason ans solution. If you have example, please post here. It would be helpful to confirm whether this is bug or not.

sunny_talwar

It might be easier to see the issue with a sample. Can either of you post a document which shows the issue?

tamilarasu
Champion
Champion

Sunny,

 

   Sorry, I am not supposed to post my application here also the file size is nearly 5 GB. Maybe we can check with  zagzebski‌.

sunny_talwar

I was talking about a sample. A new application with just the variables

tamilarasu
Champion
Champion

Well, I am too lazy for my own job. I will try to create a sample one.

trdandamudi
Master II
Master II

This happened to me long back and it did happened randomly.  if I remember well what I did was I cleared the field twice and then set the field value...  I think that fixed the issue. I will see if I can trace that code.....

tamilarasu
Champion
Champion

Sunny, I have tried the same procedure mentioned above in a sample application. But it's working fine in version 12. I have this issue in one of my app and the QV Version was 11.20 SR 9. Lets wait for OP's reply.

sunny_talwar

Sounds good