Qlik Community

QlikView Creating Analytics

Discussion Board for collaboration related to Creating Analytics for QlikView.

dirk1955
Contributor

Transfer selection to variable

Hi,

I have a table wich contains file paths.

After the selection of a file path i want to transfer the selected file path to a variable wich i will use to load data from the selected file, via partitial load.

How can this be done?

I have included the qvw.

THX

Dirk

Tags (1)
1 Solution

Accepted Solutions

Re: Transfer selection to variable

You can add a Set Variable action to the OnSelect trigger of the Field with the file paths. You can then use the variable in the load script for the partial reload. Something like:

Table1:

REPLACE ONLY LOAD * FROM [$(vFilePath)]

(biff, embedded labels, table is [Sheet1$]);

edit: see attached example


talk is cheap, supply exceeds demand
8 Replies

Re: Transfer selection to variable

You can add a Set Variable action to the OnSelect trigger of the Field with the file paths. You can then use the variable in the load script for the partial reload. Something like:

Table1:

REPLACE ONLY LOAD * FROM [$(vFilePath)]

(biff, embedded labels, table is [Sheet1$]);

edit: see attached example


talk is cheap, supply exceeds demand
dirk1955
Contributor

Re: Transfer selection to variable

Hi,

"You can add a Set Variable action to the OnSelect trigger of the Field with the file paths."

Where can i do that?


dirk1955
Contributor

Re: Transfer selection to variable

THX, but thats what i already did in the uploaded example.

Everytime i get the same error, cannot open...screenshot.1.png.

Not applicable

Re: Transfer selection to variable

You have the create the variable first. Create the variable from the variable overview dialog box; don't create it in the script since the value will be overwritten.

dirk1955
Contributor

Re: Transfer selection to variable

Hi,

Your example is working for me also.

But, what version of clickview are you using?

And: i don't see an action on the triggers tab of the sheet properties.

Furtermore i don't have the possibillity to add a button with the action reload or partial reload in the button properties action window.

dirk1955
Contributor

Re: Transfer selection to variable

Hi,

Your example is working for me also.

But, what version of clickview are you using?

And: i don't see an action on the triggers tab of the sheet properties.

Furtermore i don't have the possibillity to add a button with the action reload or partial reload in the button properties action window.

Re: Transfer selection to variable

I'm using QV11. I've also tried my example in QV10 (SR3). In QV10 it's indeed not possible to add a reload action. It's not available. The interesting thing is however that the reload action I added using QV11 can still be used if the document is opened in QV10.

The triggers I added can be found on the Triggers tab of the document properties screen instead of on the sheet properties screen.


talk is cheap, supply exceeds demand
dirk1955
Contributor

Re: Transfer selection to variable

Thank you for the explanation, my problem is solved now.

Community Browser