Hi,
I’ve inherited a Notes DB with web access and I’m having trouble fixing an issue.
It basically has some users uploading files, and other users downloading those files for alteration.
The problem is that 2 users can download the same file, duplicating work.
There are several views which contain links to the documents with an ‘Outstanding’ status. The View ‘Form Formula’ has the name of the ‘Download’ form in it. The form seems to open with an ?OpenDocument url.
The Form contains a ‘Download’ button which sets the status to ‘In Progress’ and provides a link to the attached file. It also seems to reload the form with an ?EditDocument url.
How can I stop 2 people downloading the same file? Ideally, I’d like the Status to be changed when the document link is clicked on in the view, and force the view to refresh in everybodies browser. I’m not sure that’s possible, though.
I guess a last minute check on the status before the file is actually downloaded would do the trick, but if 2 people click on the same link, are they actually opening the same document, or copies of it? Does changing the status in one affect the other?
The code in the ‘Download’ button is:
FIELD DownloadBy:=@Name([CN];@UserName);
FIELD Status:=“In Progress”;
FIELD Check:=“1”;
FIELD DownloadWhen:=@Now;
@Command([FileSave])
The code in the attachment link is:
DatabasePath:=“http://” + @GetHTTPHeader(“Host”) + “/” + @Subset(@DbName;1) + “/”+ @WebDbName;
temp:=@AttachmentNames;
ahref:=“”;
@If(check=“”;“”;@If(temp=“”; “”; “[”+ahref+temp+“”+“]”))
If somebody could help me out, I’d appreciate it.
Many Thanks,
Janine