Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6662777
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T02:25:36+00:00 2026-05-26T02:25:36+00:00

I would like to retrieve the Record activity flag of Lotus Notes database, shown

  • 0

"Record activity" flag of Lotus Notes database

I would like to retrieve the “Record activity” flag of Lotus Notes database, shown in the screenshot (see the checkbox in the bottom-left corner). How can I do that through API?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T02:25:37+00:00Added an answer on May 26, 2026 at 2:25 am

    UPDATE:
    No way to do so via LotusScript alone, but perhaps you can get this information via the Lotus Notes C API.

    The NSFDbGetUserActivity method will either return the user activity information (shown in that dialog) or it will return ERR_SPECIAL_ID if there is no summary information. This is not a precise way to determine whether the record activity flag is checked, but you could infer the state of the flag from the result of the method.

    Of course, there’s still the chance the flag is checked, but no activity has been recorded yet, or conversely the flag is not checked but activity was previously recorded in the database.

    Another solution may be to programmatically perform an action that would normally get recorded in the User Activity. You could then check to see if that activity is in fact recorded, and you’d then know whether that flag was active or not. If you dedicate a special Notes user to run this code, it would be easier to pick out that user from the list of activities avoiding a false positive caused by some normal end-user activity.

    The code below shows you how to get at the User Activity information via the C API, taken from example #3 on this tutorial page: http://www.triplewhitefox.com/tech-calling-c-api-from-lotusscript

    (declarations)

    'Structures used by Notes C API
    Type TIMEDATE
       Innards(1) As Long 'DWORD
    End Type
    
    Const MAXALPHATIMEDATE = 80
    
    Type DBACTIVITY
       First As TIMEDATE      'TIMEDATE /* Beginning of reporting period */
       Last As TIMEDATE        'TIMEDATE /* End of reporting period */
       Uses As Long            'DWORD /* # of uses in reporting period */
       Reads As Long           'DWORD /* # of reads in reporting period */
       Writes As Long          'DWORD /* # of writes in reporting period */
       PrevDayUses As Long     'DWORD /* # of uses in previous 24 hours */
       PrevDayReads As Long    'DWORD /* # of reads in previous 24 hours */
       PrevDayWrites As Long   'DWORD /* # of writes in previous 24 hours */
       PrevWeekUses As Long    'DWORD /* # of uses in previous week */
       PrevWeekReads As Long   'DWORD /* # of reads in previous week */
       PrevWeekWrites As Long  'DWORD /* # of writes in previous week */
       PrevMonthUses As Long   'DWORD /* # of uses in previous month */
       PrevMonthReads As Long  'DWORD /* # of reads in previous month */
       PrevMonthWrites As Long 'DWORD /* # of writes in previous month */
    End Type
    
    'STATUS LNPUBLIC NSFDbGetUserActivity(DBHANDLE hDB, DWORD Flags, DBACTIVITY far *retDbActivity, HANDLE far *rethUserInfo, WORD far *retUserCount);
    Declare Function NSFDbGetUserActivity Lib "nnotes.dll" (Byval hDB As Long, Byval Flags As Long, retDbActivity As DBACTIVITY, rethUserInfo As Long, retUserCount As Integer) As Integer
    
    'STATUS LNPUBLIC NSFDbClose( DBHANDLE hDB);
    Declare Function NSFDbClose Lib "nnotes.dll" (Byval hDB As Long) As Integer
    
    'STATUS LNPUBLIC NSFDbOpen(char far *PathName, DBHANDLE far *rethDB);
    Declare Function NSFDbOpen Lib "nnotes.dll" (Byval filepath As String, DB As Long) As Integer
    
    'STATUS LNPUBLIC ConvertTIMEDATEToText(const void far *IntlFormat, const TFMT far *TextFormat, const TIMEDATE far *InputTime, char far *retTextBuffer, WORD TextBufferLength, WORD far *retTextLength);
    Declare Function ConvertTIMEDATEToText Lib "nnotes.dll" (Byval IntlFormat As Integer, Byval TextFormat As Integer, InputTime As TIMEDATE, Byval retTextBuffer As String, Byval TextBufferLength As Integer, retTextLength As Integer) As Integer
    

    Initialize

    Sub Initialize
       Dim ReturnCodel As Long
       Dim hDBl As Long
       Dim retDbActivity As DBACTIVITY
       Dim rethUserInfo As Long
       Dim retUserCount As Integer
       Dim Flags As Long
    
       Dim retTextBuffer As String
       Dim retTextLength As Integer
       Dim BufferSize As Integer
    
       Dim session As New NotesSession
    
       'Open the database
       ReturnCodel = NSFDbOpen(session.CurrentDatabase.FilePath, hDBl)
       If ReturnCodel <> 0 Then
          Error 9999, "An error occurred calling the API function " + _
             "NSFDbOpen." & Chr$(10) & "The return code was " & + _
             Trim$(Str$(ReturnCodel)) & "."
          Exit Sub
       End If
    
       Flags = 0
       ReturnCodel = NSFDbGetUserActivity(hDBl, Flags, retDbActivity, rethUserInfo, retUserCount)
       If ReturnCodel <> 0 Then
          Error 9999, "An error occurred calling the API function " + _          "NSFDbGetUserActivity." & Chr$(10) & "The return code was " & + _
             Trim$(Str$(ReturnCodel)) & "."
          Call NSFDbClose(hDBl)
          Exit Sub
       End If
    
       retTextBuffer = String$(MAXALPHATIMEDATE + 1,0)
       ReturnCodel = ConvertTIMEDATEToText(0, 0, retDBActivity.First, retTextBuffer, MAXALPHATIMEDATE, retTextLength)
       Print "First access = " + Left(retTextBuffer, retTextLength)
    
       retTextBuffer = String$(MAXALPHATIMEDATE + 1,0)
       ReturnCodel = ConvertTIMEDATEToText(0, 0, retDBActivity.Last, retTextBuffer, MAXALPHATIMEDATE, retTextLength)
       Print "Last access = " + Left(retTextBuffer, retTextLength)
    
       Print "Uses = " + Cstr(retDBActivity.Uses)
       Print "Reads = " + Cstr(retDBActivity.Reads)
       Print "Writes =" + Cstr(retDBActivity.Writes)
    
       'Close the database
       ReturnCodel = NSFDbClose(hDBl)
    End Sub
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am adding data to my database, but would like to retrieve the UnitID
I would like to retrieve the ethernet address of the network interface that is
I would like to retrieve at runtime the values for the dialect and connection.driver_class
I would like to retrieve the AppSetting key from the assembly config file called:
I would like to retrieve the contents of a file, filter and modify them
I would like to retrieve an ordered query result, but I need to have
I am saving images to the photo library and would like to retrieve them
I have a reference to a type, for which I would like to retrieve
I have a 3-leveled hierarchy of entities: Customer-Order-Line, which I would like to retrieve
I have an SQL Server 2000 db, and I would like to retrieve summary

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.