Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

bookmark alternate state in GetSelectedCount method

Helo,

Is it possible to use a bookmark's alternate state in GetSelectedCount method?

GetSelectedCount (Field1) returns count of selected Field1 values

GetSelectedCount (Field1, 'false', 'AltSt1') returns count of selected Field1 values in alternate state AltSt1.


I want to get count of selected Field1 values in alternate state AltSt1 in bookmark BM01.


I tried GetSelectedCount (Field1, 'false', 'AltSt1::BM01') but that doesnt return any value.


Is there a different syntax?


Thanks,

VJ

8 Replies
sindu_bharathi
Partner - Contributor III
Partner - Contributor III

Hi Vijay,

GetSelectedCount(),GetFieldSelections(),etc functions will not work with Alternate States.

to get its count you can use like below

substringcount(concat(alternateStateField,'|'),|)

Regards,

Siindu

Gysbert_Wassenaar

Use of Alternate States in the GetSelectedCount function is available in QV 11.2 SR8 and newer. But AltSt1::BM01 is set analysis syntax. Set analysis is not supported in the Get* functions afaik.


talk is cheap, supply exceeds demand
Anonymous
Not applicable
Author

So how is bookmark's alternate state handled in get functions? Or is usage of bookmark's alternate state not supported in GetSelectedCount function?

Gysbert_Wassenaar

Bookmarks don't have alternate states.

edit: well, that could be argued either way I suppose.


talk is cheap, supply exceeds demand
Anonymous
Not applicable
Author

Apparently they do. When a bookmark is saved, all states are saved and we can refer individual states within a bookmark using AltSt1::BM01 syntax in set analysis. So far it looks like this is not possible in get methods.

Gysbert_Wassenaar

AltSt1::BM01 syntax in set analysis

Like you said and as I said earlier: in set analysis. The Get* functions do not support set analysis.


talk is cheap, supply exceeds demand
Anonymous
Not applicable
Author

I understand that. Thank you. Just wondering if there is any other syntax I could use in get functions to refer bookmark's alternate state.

Gysbert_Wassenaar

No, not in the Get* functions. You will have to use a regular count or concat expression.


talk is cheap, supply exceeds demand