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

  • SEARCH
  • Home
  • 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 882485
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T12:26:02+00:00 2026-05-15T12:26:02+00:00

Can we use a lotusscript function as a document selection routine inside view selection

  • 0

Can we use a lotusscript function as a document selection routine inside view selection formula ?

Here is my lotus function which determines the selection criteria


Function MyFilter(doc As NotesDocument) as boolean

'very complex filtering function
'........

End Function

and here is the view selection formula that i want to incorporate the lotus function inside


SELECT (Form = "Form1")

  1. can we use the above lotusscript function inside the selection formula in any way?


    SELECT (Form = "Form1" & MyFilter(sourceDoc))

  2. can we avoid the formula language in the view selection and populate the view at run time
    by traversing each document in the database and adding the document to the view as required?

  3. Is there a way to write a “user defined formula” (formula language)?

  4. Can we write a C API to address such problems?

  • 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-15T12:26:03+00:00Added an answer on May 15, 2026 at 12:26 pm
    1. No, view selection formulas cannot contain LotusScript

    2. Not with a view, but you’re onto something there. I’ve done that in the past using folders. Views contain a set of documents that match a view selection formula. Folders, on the other hand, can contain a collection of documents placed there by a user or by code. In the Lotusscript world, you access a folder the same way as a view, using the NotesView class. Then you can call the document’s PutInFolder method or a documentcollection’s PutAllInFolder method to add documents to that folder.

    3. No. You can programmatically specify the formula used by views, though, via the SelectionFormula property. But that property expects a string written in formula language.

    4. I’m not very familiar with the C API, but my bet is you can only do the same as #3 – specify the formula used as the selection formula. It won’t help you select documents based on LotusScript code.

    I’ve been down this road before in a few projects, and the best solution I found was what I suggest in answer #2. That is to say you can clear and then populate a folder programmatically, and then take the user to that folder as the final step in your code. Using that method you are free to use LotusScript to filter the documents and build your “query results” view.

    Another less ideal, but functional method you can use is to stamp one item within all the documents with a special value, then filter a view to show only documents with items equal to that special value. For example, you can run a search in LotusScript to build a documentcollection using the db.Search method. Then use the documentcollection.StampAll method to set the “SHOWME” item to “YES”. Then your view will just have to be set to show only documents where SHOWME = “YES”. Of course, you’ll need to remove that SHOWME item from all documents in the database as a first step in this code, so you’re starting with a clean slate each time. This method would get increasingly slow the more documents you have, but if you only have a few hundred docs it would work fine.

    Hope this helps!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 496k
  • Answers 496k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Assume you have row with property field Properties defined as… May 16, 2026 at 11:34 am
  • Editorial Team
    Editorial Team added an answer Although the static wsdl creation approach was promising, I chose… May 16, 2026 at 11:34 am
  • Editorial Team
    Editorial Team added an answer Logically it should work. You're missing a dot . for… May 16, 2026 at 11:34 am

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Related Questions

can use anything in any order? does placing of <meta http-equiv=Content-Type content=text/html;charset=UTF-8> is important
Can I use two different back ends for an .net Entity Framework project? I
You can use more than one css class in an HTML tag in current
You can use a standard dot notation or a method call in Objective-C to
I can use properties of an Excel Worksheet to tell if the worksheet is
You can use ftplib for full FTP support in Python. However the preferred way
You can use SelectFolder() to get a folder or GetOpenFolderitem(filter as string) to get
I can use both in the code behind: SetFocus() - Sets the browser focus
How can I use globalCompositeOperation for erasing something? http://canvaspaint.org/ has an eraser, but that's
In XUL you can use create a status bar panel icon, similar to the

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.