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

Import Export inputfield qvd

Hi evryone!

i try to describe my problem:

this is the table that i load in qlik script

INPUTFIELD B;

pluto:

LOAD * INLINE [

    A, B

    pippo, 1

];

in layout i have create a chart (straight table) with dimension A and expression inputsum(B).

Now suppose that i change value of B (for example 99).

Then i've create a botton with a macro to save chart in a qvd:

Sub prova2

set obj = ActiveDocument.GetSheetObject("CH01")

obj.ExportEx "C:\Users\s.fiemazzo\Desktop\prova2.qvd", 4

End Sub

the QVD contain correctly the value 99

suppose that in layout i change the value of the inputfield B

Now i want create another botton to import the QVD and restore the value of 99 in the chart

i create this macro linked to the new button:

Sub prova3

ActiveDocument.PartialReload

End Sub

and in qlik script i add this statement:

replace load * from C:\Users\s.fiemazzo\Desktop\prova2.qvd(qvd);

BUT THID DON'T WORK... When i clik the button import the value in chart is 1 and not 99 (qlik seems take the number that i load for first)

ANY SUGGESTION?

5 Replies
Not applicable
Author

is a budget?

Not applicable
Author

I want simulate versioning of budget...

so i want save a version of a budget saving into a qvd to reopen in a second moment... how i can do this?

There is another method to do this?

munozdj1
Partner - Contributor
Partner - Contributor

Hi dedagroup,

I believe the problem could be that QV is executing some other statements apart from the ones you labeled with REPLACE. To solve it (if indeed that's the problem), try using the IsPartialReload() function to split the code in two different streams, one for each reload mode with the statemens needed in each case.

Maybe you're dropping the table and reloading it later on in your code?

Hope this helps

Not applicable
Author

Thx for reply,

but the problem persist even if i use a control like isPartialReload(). I conclude that using replace is not the right way. I walked around and i created a variable to manage changhing input table:

if $(variable)=version1 then load...

elseif $(variable)=version2 then load...

maybe is not performed but it works fine

chematos
Specialist II
Specialist II

I think it's possible that the tables are being automatically concatenated.