ACLActivitylog

Hi!

i need to know quich acl’database has been modified in 2013 and my agent gave me empty. IT’s impossible that all acl database are not modified in 2013.

This is my agent:

Dim session As New NotesSession

Dim db As NotesDatabase

Dim msg As String

Dim directory As New NotesDbDirectory(“CCD_NOTES_SERVICES”)

Set db = directory.GetFirstDatabase(DATABASE)

While Not (db Is Nothing)

Forall logEntry In db.ACLActivityLog

If Left(logEntry,4) = “2013” Then

msg = msg & db.Title & ": " & logEntry & Chr(10)

End If

End Forall

Set db = directory.GetNextDatabase

Wend

Messagebox msg, “ACL activity log”

Can you help me please?

Subject: ACLActivitylog

Do any of the lines returned start with 2013 ?

If none of them start with 2013, then the code is running correctly.

Subject: RE: ACLActivitylog

No, it’s empty too if i don’t have the if…2013

Subject: RE: ACLActivitylog

Change your test to

If instr(logEntry,"2013 ") Then

The logentry that is returned has a tab as the first postion and date delimiters

Subject: RE: ACLActivitylog

Hi!

I try

If Instr(logEntry,"2013 ") Then

but empty again.

I had

Messagebox logEntry after the forall

and these is nothing in the popup.

Subject: RE: ACLActivitylog

Why not using the debugger and see what is actually happening, and what values the different variables contains?

Subject: RE: ACLActivitylog

I try that and ACLActivityLog has only one occurrence and it’s empty:

ACLActivityLog(0) = “”

Subject: RE: ACLActivitylog

But you want to check the value of logEntry, not ACLActivityLog… Step though the code one line at a time and see what happens.

The line in your code where you have the issue is:

If Left(logEntry,4) = “2013” Then

So obviously you must check the value of logEntry and see if it does contain “2013”.

Subject: RE: ACLActivitylog

How about seeing what db you are getting and add a fake acl entry so you can right away see if the code works.

Subject: ACLActivitylog-Solution

Hi!

I find the solution of teh problem:

The databases must be open to use aclactivitylog.

So, i add

Call db.open(“”,“”)

before the forall

thank you!