Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

input field values lost after reload

Hi everybody,

I'm using input fields in pivot table. So each user can input a value on lines.

But after a reload every values input have disapeared!

The goal is to keep those values because everybody must input and the values have to be shared.

I thought this was stored in .shared files.

Am i wrong?

How can I keep and share this input fields?

best regards

chris

1 Solution

Accepted Solutions
Not applicable
Author

Hi Chris,

The values entered in the input box are usually assigned to variables and qlikview saves only the information about server objects, and not the data itself, in the .shared files .

If you'd want to save the data for future use; you'd have to write a macro to save the input data to some file and read from it while relaoding the document. so that all the inputs values are available for use in the UI.

Also, writing a procedure to save the data via access point can become tricky at time. As we know macro functionality is limited when used with Ajax. IE plugin provides better functionality, however, at times i find it to be inconsistent.

See the sample to write data from QV document to a XML file. You can tweak it to fit to your requirement.

Sub ExportToXML()

dim FilePath

FilePath = ActiveDocument.Evaluate("replace(documentpath(), documentname(), '')")

FileName = ActiveDocument.Evaluate("replace(documentname(), '.qvw', '.xml')")



TableID     = InputBox("Enter Table Object ID to export","User Input")

'TableID = UCase(TableID)

if Len(TableID) > 0 then



Set ExportTable = ActiveDocument.GetSheetObject(TableID)



'     Set ExportTable = ActiveDocument.GetSheetObject("TB08")

ExportTable.ExportXml FilePath & FileName



End if



End Sub

View solution in original post

4 Replies
Not applicable
Author

Hi Chris,

The values entered in the input box are usually assigned to variables and qlikview saves only the information about server objects, and not the data itself, in the .shared files .

If you'd want to save the data for future use; you'd have to write a macro to save the input data to some file and read from it while relaoding the document. so that all the inputs values are available for use in the UI.

Also, writing a procedure to save the data via access point can become tricky at time. As we know macro functionality is limited when used with Ajax. IE plugin provides better functionality, however, at times i find it to be inconsistent.

See the sample to write data from QV document to a XML file. You can tweak it to fit to your requirement.

Sub ExportToXML()

dim FilePath

FilePath = ActiveDocument.Evaluate("replace(documentpath(), documentname(), '')")

FileName = ActiveDocument.Evaluate("replace(documentname(), '.qvw', '.xml')")



TableID     = InputBox("Enter Table Object ID to export","User Input")

'TableID = UCase(TableID)

if Len(TableID) > 0 then



Set ExportTable = ActiveDocument.GetSheetObject(TableID)



'     Set ExportTable = ActiveDocument.GetSheetObject("TB08")

ExportTable.ExportXml FilePath & FileName



End if



End Sub

Not applicable
Author

Thank you for your quick anwser, i'm gonna try this.

regards

Chris

Not applicable
Author

Thank you Syed,

It creates a file. I will manage a solution with this.

Best regards

chris

Not applicable
Author

Dear Syed.

Thank you for your great macro above - i had been struggling with this until i saw you post. I have managed to make the  export.xml fil. now.

However, is it possible, you can help me with the load function when loading the qlikview document.

I would like to have the exported data back into the table, when opening or reloading the qlik doc.

Best regards

Soren Kluge