Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
gidon500
Creator II
Creator II

Append to file on opening

Hi  guys

i need to creats a log file

when a user open a document  a line will be added to a file

can be txt or qvd

osuser , and timestamp

only once on open  , we are not using server based  qlikview

we are using personal lisense for every user

thanks

gidon

5 Replies
pratap6699
Creator
Creator

In the .qvw: Settings > Document Settings - check the 'Generate Logfile' checkbox, a log file will now be created in the same folder as the .qvw.

gidon500
Creator II
Creator II
Author

hi

thanks for your fast response

what this option does it generate log file of reload

i need log file of  users who open the document

is there a solution for this

thanks

gidon

Peter_Cammaert
Partner - Champion III
Partner - Champion III

I don't know if there is a ready-made solution in some community thread. But an approach like this should work. BTW in macros you can perform a write-append to a text file.

  1. Create a macro that writes/appends a single line to your preferred text file. Let's call it WriteLog.
  2. Define a Run Macro action on the Document Event Trigger OnOpen (see Settings->Document Properties->Triggers)
  3. In the Macro name field, enter WriteLog

This technique will fail to work in a QlikView server environment.

Best,

Peter

gidon500
Creator II
Creator II
Author

Hi Peter

thanks for your respond

can you help me  wrinting such a macro

to export the osuser and the time

thanks

gidon

Peter_Cammaert
Partner - Champion III
Partner - Champion III

Don't be afraid of the Search field in the top right corner of every community page.

It provided me with these highly useful links:

Writing/Appending to new/existing text file (including timestamp): Re: write variable to file using macro

Access to OSUser from inside macro: Working with the variable "OsUser" within the Macro

Best,

Peter