Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

how to use Bookmark in a script ?

Hello !

i would like to use a precedent saved bookmark in a qlikview project in order to create a table. Here is an exemple : my bookmark name is S1

LOAD idcli_horus,

  ID,

  Dans 11

     FROM

(txt, codepage is 1252, embedded labels, delimiter is ';', msq);

SumData:

LOAD

    replace(count( {@} [Dans11]),'@','S1') as Salary

RESIDENT Table1;

Let vSalary  = peek('Salary',0,'SumData');

DROP TABLE SumData;

Load * Inline [

Gender, Type, Expected, Observed

Male, Bons, $( vSalary),4000

Male, Tous, 6191,6191];

The probleme is that the script doesn't take into account the bookmark S1 and use instead the total selection {1}.

Please Help me !!

thank you

Am'

1 Solution

Accepted Solutions
jonathandienst
Partner - Champion III
Partner - Champion III

A bookmark is a selection from your data model. At the time the script is running there is no data model and no selections, so there is no way to use the bookmarked selections during the reload.

For the same reason, set analysis does not work in the reload script either.

Perhaps you should explain what you are trying to do.

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein

View solution in original post

8 Replies
fkeuroglian
Partner - Master
Partner - Master

Hi

You cant do this, this will not work because when you run your script the bookmark is not created yet.

pherphaps you can try to do using variables, and you will have the same result

good luck

Fernando

jonathandienst
Partner - Champion III
Partner - Champion III

A bookmark is a selection from your data model. At the time the script is running there is no data model and no selections, so there is no way to use the bookmarked selections during the reload.

For the same reason, set analysis does not work in the reload script either.

Perhaps you should explain what you are trying to do.

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
Anonymous
Not applicable
Author

Not possible . .

avinashelite

You can try with some workarounds , like store your bookmark info as the text file  or excel file and you utilize that info in your load script. Their is no direct way to do this.

Get Bookmark ID by Name

Not applicable
Author

You can't use set analysis in QlikView script. Set analysis works in expression only

Not applicable
Author

Thank's every one for your answers ! I found another way to do that !

avinashelite

can you please share your solution, so that it will be useful for other too and please mark the helpful and correct answer too

Not applicable
Author

My purpose by creating a bookmark was to create a table that countains the caracteristics of my selection in order to run a chi2test on it (this test work just with row and column so with a pre-downloaded table). My solution was to not use the qlikview chi2 fonction. Unstead, I made this test my self by using variables.