Skip to main content

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Welcome to Qlik Community! Check out our new navigation! FIND OUT MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Sql from presentation

i have 3 documents in the aplication architecture

Extraction

Model

Presentation

in the extraction qvw i make a sql in the data base and store it in a qvd file

then i load it and transform it in the model qvw.

and in the presentation qvw show some data (expresions calculations charts)

this sql is executing with a date parameter Today.

but now in the presentation qvw i have a calendar table

and i need

if i select a date in this calendar filters make the sql extraction not with the parameter today

make sql from presentation with this selected date

transform it in the model qvw

and show the same data (expresions calculations charts) but of the selection i made.

how i can do this.....

1 Solution

Accepted Solutions
prasad_dumbre
Partner - Creator
Partner - Creator

Hi Carlos,

In Presentation qvw, you can save variable value into a txt file using macro.

In same qvw, using macro or a button Action (Button Properties->Action->External->Open QlikView Document)

you can open the extraction.qvw.

Now, In document properties of extraction.qvw, you have trigger on open document. using this you can reload your application. Means each time application gets opened it will reload automatically due to this trigger.

Now, you only have write script in extraction.qvw to fetch data (a date) from txt file as a field and use it as a parameter for restricting the data extraction.

I Hope it was helpful to you . .

View solution in original post

3 Replies
prasad_dumbre
Partner - Creator
Partner - Creator

Hi Carlos,

What you can do here is, store selected datevalue from calendar into a variable, then store that variable value in .txt file or other file on click of button or trigger.

Once you do that, open your extraction .QVW, and read value from that .txt or other file and use this value as a parameter while fetching data from sql.

But make sure you always have value in that file from which you are fetching . . .

Not applicable
Author

Hi, prasad,

can i execute the extraction .QVW automatically and assign this value from the clik button or trigger??

without open it

prasad_dumbre
Partner - Creator
Partner - Creator

Hi Carlos,

In Presentation qvw, you can save variable value into a txt file using macro.

In same qvw, using macro or a button Action (Button Properties->Action->External->Open QlikView Document)

you can open the extraction.qvw.

Now, In document properties of extraction.qvw, you have trigger on open document. using this you can reload your application. Means each time application gets opened it will reload automatically due to this trigger.

Now, you only have write script in extraction.qvw to fetch data (a date) from txt file as a field and use it as a parameter for restricting the data extraction.

I Hope it was helpful to you . .