Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Multiple authors

QV8.50

We are fortunate to have 2 developers and 6 professionals. We are all running one QVD. On occasion, we have had clashes of author, i.e. two or more people trying to change and save a single document.

Does anyone know of a way we can alert users, in the way Excel does for example, when someone else has a file open?

Ta

3 Replies
fseregaza
Partner - Contributor III
Partner - Contributor III

Hi Russell,

I have an idea to resolve your problem. You should use (in your script) a DOS command to create a temporary file you will use as an "occupation flag". Then, you will only have to test if the file exists or not before making your modifications.

The script will be something like that:

SET TFile = QVTemp.txt; // Store there the name of your temporary file

// Set a variable indicating if the QVD exists or not
IF FileSize('$(TFile)') > 0 THEN
// What you do if already in use
ELSE
EXECUTE cmd /c echo 'In use' > QVTemp.txt;
// What you do if free
EXECUTE cmd /c del QVTemp.txt;
END IF

Does it answer your question ?

Best regards,

Franck SEREGAZA

Business & Decision

Not applicable
Author

Thanks Franck, I love the simplicity of your idea, and I am sure it will work.

Would you know how to record the active user's ID in the qvtemp.txt file? I was thinking this could then be displayed as an alert when opening the document.

Regards

Russell

fseregaza
Partner - Contributor III
Partner - Contributor III

Depending on what you want, you can use 2 QV functions:

  • QVUser(): return the login of the QV user (interesting only when you use a security for opening your application).
  • OSUser(): return the OS user which opened the application (you should use this one).

I hope it will fit you.

Best regards,

Franck SEREGAZA

Business & Decision