My.ADVISOR.com Sign-In
ID
Password

Member Center / Sign-Up
Go to Article
Advanced Search 

ADVISOR TIPS

Protect Lotus Design Via Code

LotusScript fuction to control design element protection checkbox.

By Mark Arteaga

I was creating shared folders in LotusScript using Doc.PutinFolder([FOLDERNAME],1).

This worked beautifully, but when a refresh of the template went through at night, the folders disappeared. This happened because the option "Prohibit design refresh or replace to modify" wasn't checked.

I hate doing things manually so I wrote the code below.

  • In the mail template or your mail database, look for the view ($FolderInfo). This shows all the folders in the database as documents.
  • The function gets a handle on the view name ($FolderInfo) and scrolls through all the documents in the view. Put the code in as a Library or whatever you prefer.
  • The field $Flags holds information on the folder. "Prohibit design refresh or replace to modify" is represented by "P". If the "P" is not there, add it and the checkbox will be on when viewed in Domino Designer.

Function ProhibitDesignChangesOnFolder(FolderName As Variant)
  Dim d As notesdatabase
  Dim s As New notessession
  Dim v As notesview
  Dim doc As notesdocument
  Dim t_fname As Variant
  Dim temp As Variant

  Set d = s.currentdatabase
  Set v = d.getview("($folderinfo)")

  Set doc = v.getfirstdocument

  While Not(doc Is Nothing)
    t_fname = doc.getitemvalue("$Name")
    If t_fname(0) = FolderName Then
      temp = doc.getitemvalue("$Flags")
      If Instr(1,temp(0),"P") = 0 Then
        'if it is not in the flags then add it to the end
        'P is for prohibit design changes
        Call doc.ReplaceItemValue("$Flags", temp(0) & "P")
        doc.save 1,0
        Exit Function
      End If
    End If
    Set doc = v.getnextdocument(Doc)
  Wend
End Function


Prohibit Lotus Notes/Domino Design Refresh or Replace

No reader comments ... yet.

    What do YOU think about this topic? Share your advice and thoughts using this form.

    Your Name

    REQUIRED : PUBLIC

    Your E-Mail

    REQUIRED : PRIVATE

    Job, Company

    OPTIONAL : PUBLIC

    City, State, Country

    OPTIONAL : PUBLIC

    Your Web Site

    OPTIONAL : PUBLIC

    Your Comment

    Please help everyone by keeping your comments on-topic, using clean language, and not defaming or making personal attacks.


    Your e-mail address is required, but it will not be displayed to the public or given to anyone. See our Privacy Policy. Comments become visible after they pass our spam filter, and spammers and abusers are permanently blocked. Please report spam or abuse.

    Printer-friendly
    page layout

    Keyword Tags: Code, Lotus, Lotus Notes, LotusScript, Programming

    ADVISORAMA
    If the first law of friendship is that it has to be cultivated, the second law is to be indulgent when the first law has been neglected.
    -- Voltaire

    ARTICLE INFO

    DataBased Advisor

    Web Edition: 2000.06.21, Doc #06277

    FREE ACCESS FREE ACCESS

    SUBSCRIPTION STATUS
    You are not signed-in. If you are a subscriber to this publication, sign-in above to access locked articles. To subscribe or renew go to www.AdvisorStore.com.

    Subscribe to DATABASED.ADVISOR.com

    Get it all -- every current and past ADVISOR tech/business publication, now all-in-one subscription, with new articles and a huge reference library packed with expert advice, how-to and downloads. Subscribe now to get it all.

    DataBased.Advisor.com

    Subscribe to FileMaker Advisor Magazine

    Read the advanced guide to creating custom business database solutions with FileMaker software. Subscribe now to gain access to all the archives and downloads.

    FileMaker.Advisor.com

    Subscribe to Advisor Basics of FileMaker Pro

    Learn the fundamentals of using FileMaker Pro software. Every issue gives you step-by-step instructions on creating the databases you need. Subscribe now!

    FileMaker.AdvisorBasics.com

    Showcase Your Smarts

    Submit your tips, techniques and advice and let Advisor promote your business and build your career. Show the world what you know!

    AdvisorTips.com

    Use of this or any other site, content, product or service of Advisor Media constitutes acceptance of Terms of Use.
    Portions copyright ©1983-2008 Advisor Media, Inc. All Rights Reserved.
    Reuse or reproduction of any portion or quantity of Advisor Media's copyrighted content, in any form, for any purpose, requires written permission.
    ADVISOR®, the ADVISOR logo, and other names and logos that incorporate ADVISOR are registered trademarks, trademarks or service marks of Advisor Media, Inc. in the United States and/or other countries.
    Other trademarks are used for identification, editorial or descriptive purposes and are the property of their owners.
    Hosted by Prominic.NET Website powered by
    LOTUS SOFTWARE
    ADVTP077 posted 06/21/2000 modified 01/07/2009 03:42:35 AM ztdbms/ztdbms
    domino-144.advisor.com my.advisor.com 01/07/2009 01:21:51 PM