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: 
sahilkain1
Contributor II
Contributor II

Always One Selected value gets disabled when the app moves to a new environment

Hi All,

I've a App created in Dev Hub where i've given Always selected one value. When i'm importing the app to other environment i.e. QA or Prod, the Always Selected one value gets disabled.

Can anyone help how to get these setting enabled while import the app to other environments.

Regards,

Sahil Kain

3 Replies
AdamBS
Partner - Creator
Partner - Creator

Hi - when you export/import do you do it without data?  If you do that, the always one can't be maintained because there is no data value to match the App's setting and so Qlik turns off always one.

If your Apps are large then consider a debug load in Dev - limit the row count and move the App with some data - of course, if the limited reload does not have the always one value in it, Qlik will also turn off the always one.

Best option: remove the need for always one.  I usually do that with a variable.

set vAlwaysExample = "=if(getpossiblecount(TheDataField)=1,TheDataField,'my default always one')";

Adam Barrie-Smith
iOCO Analytics Solutions
sahilkain1
Contributor II
Contributor II
Author

Hi Adam,

Thanks for your reply.
I've tried the approach you suggested, but couldn't  get the desired result.

Selection
A
B
C

 

I've a filter (Selection) where I've values A,B,C. as per your solution, I've created a variable 
set vAlwaysExample = "=if(getpossiblecount(Selection)=1,Selection,'A')";
In this case when i'm putting this variable in the filter instead of getting all the 3 Values I'm getting only 1 value which is A and this value is not even by default selected.
Can you please let me know if I'm missing anything.

Regards,
Sahil Kain

AdamBS
Partner - Creator
Partner - Creator

I don't think you are missing anything, it is more likely we are not understanding each other.

I would expect with no selections the $(vAlwaysExample) would evaluate to A.

If you select B then it should reflect B.  Notice that the variable by-passes the need for the filter pane/listbox to have a single value - the user can do no selection, 2 selections which result in the default A and only when they do 1 selection does the variable set away from A.

Adam Barrie-Smith
iOCO Analytics Solutions