Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

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
MVP
MVP

Re: how to use Bookmark in a script ?

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
8 Replies
Highlighted
Partner
Partner

Re: how to use Bookmark in a script ?

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

MVP
MVP

Re: how to use Bookmark in a script ?

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
rsatish111
New Contributor III

Re: how to use Bookmark in a script ?

Not possible . .

Re: how to use Bookmark in a script ?

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

Re: how to use Bookmark in a script ?

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

Not applicable

Re: how to use Bookmark in a script ?

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

Re: how to use Bookmark in a script ?

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

Re: how to use Bookmark in a script ?

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.