Hi,I have an annoying problem with my intranet-based notes database.
It always works when for example, people are named in the ACL or in the groups in the ACL… But the whole point of the app is that anyone with an email address ending with our company name should be able to access it over the web.
We have a generic entry for our company name, which has the following access: User Type - Unspecified, Access:Author, Create Docs, Read/Write Public docs, and Rep docs are all checked…
When accessing the application using the generic access profile, a lot of problems occour. For a start, it asks for the internet password more than once - so that users who are already signed in are asked again when they submit the form.
Secondly, and perhaps related, duplicate documents appear to be created (perhaps especially when there is a validation thingie ??). The documents created in this ‘duplicate’ way appear to be the same as the original, even having the same @Unique value. Finally, whilst I can submit a form in seconds whilst having ‘full’ access, when testing with the generic entry, it seems to take an age…
Heres some code to keep you going.
First of all, the Submit button executes the following for ‘web browser’. The idea is that some fields have to be 6, some 8, the checkbox field called ‘What’ cannot be blank, and other fields are validated to make sure they aren’t blank. I created the ‘What’ checkbox evaluation: perhaps there is a problem with this?? Anyway here goes:
var f=document.forms[0];
if(f.UKNo.value==“”){
alert(“Please enter your new Emplyee No,”); return false;}
if(f.DateEffective.value==“”){
alert(“Please enter effective date”); return false;}
var optlength=this.form.What.length
var selvalues=‘’
for (var i=0; i<optlength;i++){
if (this.form.What[i].checked==true){
selvalues+=this.form.What[i].value + ‘\n’}}
if (selvalues==“”){
alert(“Please select enter Salary or Expenses, or both”);return false }
if(f.BankName.value==“”){
alert(“Please enter Bank Name”); return false;}
if(f.BranchAddress.value==“”){
alert(“Please enter Branch Address”); return false;}
if(f.SortCode.value==“”){
alert(“Please enter Sort Code”); return false;}
if(f.SortCode.value.length!=6){
alert(“Sort Code must be six digits”); return false;}
if(f.AccountNo.value==“”){
alert(“Please enter Account Number”); return false;}
if(f.AccountNo.value.length!=8){
alert(“Account Number must be eight digits. If you have a 7 digit account number please add 0 to the front.”); return false;}
if(f.AccountNo_1.value!=“” && f.AccountNo_1.value.length!=8){
alert(“Account number must be eight digits. If you have a 7 digit account number please add 0 to the front.”); return false;}
if(f.SortCode_1.value!=“” && f.SortCode_1.value.length!=6){
alert(“Sort Code must be six digits”); return false;}
f.submit()
Secondly, there is a ‘Webquerysave’ event, that sends emails etc. This is a LotusScript agent, Theres probably too much code to post, heres a sample from the main body:-
Sub Initialize
Dim db As Notesdatabase
Dim session As New notessession
Dim rtitem As Variant
Dim doc As Notesdocument
Dim Eval As Variant
Set db = session.CurrentDatabase
Set doc = session.documentContext
Dim SetPaid As Variant
SetPaid = Evaluate(|@If(@Contains(What;"Expenses");"N";"n/a")|,doc)
doc.Paid = SetPaid
Call doc.Save(True,True)
Eval=doc.What
Dim val1 As String
Dim val2 As String
Dim checknumberelements As Variant
checknumberelements = Evaluate(|@Elements(What)|,doc) 'work out the number of elements in the 'what' field
If checknumberelements(0)="2" Then 'then both have been entered
val1 = doc.What(0) 'seeing as both have been entered this will be Salary
val2 = doc.What(1) 'seeing as both have been entrered this will be Expenses
Else
If checknumberelements(0)="1" Then
val1 = doc.What(0)
End If
End If
If checknumberelements(0)="1" Then
If val1="Expenses" Then
Receipt
Else
Receipt
emailtrigger
End If
Else
If checknumberelements(0)="2"Then
Receipt
emailtrigger
End If
End If
Set view = db.GetView( "vwReadyToSend" )
Call view.Refresh
End Sub
Any ideas anyone? It seems to be a bizaare problem…
Incidentally, the advanced tab ACL has 'Maximum Internet Name & Password set to ‘Editor’.
ab