Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How do I list selected field values over multiple fields for a stored bookmark?

Hi,

I need to list all selected field values over multiple fields for a stored bookmark.

eg. Bookmark X has stored value '1' for field (A) and stored value '2' for field (B).

In short I need to replicate the functionality of the "Bookmark Object Properties" object (selecting a bookmark in this object will show me all 'current selections' for the bookmark) but as an expression.

I have tried several ways of doing this, using "GetCurrentSelections(A)" only lists the value currently selected, and cannot recall a set of values within a bookmark.

If anyone needs anymore information I'd be happy to oblige.

Cheers in advance,

CG

6 Replies
Not applicable
Author

let's do ir another way...

try to use set analysis

fex.

sum( {MyBookMark} Sales )

Not applicable
Author

Hi Pari Pari,

Thanks for replying.

Unfortunately using set analysis in that way would just give me an integer output when all the values in my fields are strings. I need to have each field selection for a specific bookmark listed through an expression. i.e. Bookmark has value "Tomato" from field "Fruits", and value "Red" from field "Colour". The desired end result would show 'Tomato, Red'.

The closest I have come is showing the selections within one field like this:

=concat({'$(vBM01)'} distinct FieldName, ', ')

If vBM01 had been stored with Tomato from field Fruits, I can use this expression ( =concat({'$(vBM01)'} distinct Fruits, ', ') to list all values for the field, in this case I can have a text box with that expression that will simply show "Tomato"

If I have multiple selections in that field it would show "Tomato, Banana, Apple" for example. But this will still only do it within that one single field instead of over all possible fields.

Cheers,

CG

Not applicable
Author

see att qvw file

(could you post your sample?)

Not applicable
Author

Slight update.

I've found that if I have a series of variables where each one contains the above expression with an altered fieldname I can get the desired result.

eg. variable_1 = =concat({'$(vBM01)'} distinct Fruits, ', ')

variable_2 = =concat({'$(vBM01)'} distinct Colour, ', ')

and my expression would be =(variable_1) & ', ' & (variable_2)

this gives a text output of "Tomato, Red".

Obviously this is extremely inefficient as I would need a new variable for every combination of bookmark and fieldname. With 3 fields and 3 bookmarks I would need 9 variables. Considering at any one time I have over 20 bookmarks and 80 unique fields this becomes an almost useless solution. I would also need to implement 'if' statements to jump over empty fields otherwise I could end up with "Tomato, , , , , , Red, , , , " etc.

Again, any help/ideas/solutions would be great

Cheers,

CG

Not applicable
Author

Hi again Pari,

Unfortunately this still won't return a string list of stored bookmark selections (unless I am missing something), thankyou very much for looking into the problem though It is appreciated.

My update below slightly solves the problem but not in an efficient manner.

Cheers,

CG

Not applicable
Author

im not sure what you want achieve

could you send sample file?