Skip to Main Content
HCL Domino Ideas Portal

Welcome to the #dominoforever Product Ideas Forum! The place where you can submit product ideas and enhancement request. We encourage you to participate by voting on, commenting on, and creating new ideas. All new ideas will be evaluated by HCL Product Management & Engineering teams, and the next steps will be communicated. While not all submitted ideas will be executed upon, community feedback will play a key role in influencing which ideas are and when they will be implemented.

For more information and upcoming events around #dominoforever, please visit our Destination Domino Page

Status Under Consideration
Workspace Domino Designer
Created by Guest
Created on May 7, 2020

NotesItem object: better handling of duplicate items

There are occasions where we have to deal with multiple instances of an item within a document. One example is $FILE.

The current API (LotusScript and Java) has a method "NotesDocument.getFirstItem". What is missing here is something like "NotesDocument.getNextItem", "NotesDocument.getNthItem" etc. as well as the option to see how many duplicate instances of an item exist within a NotesDocument object.

Apparantly this information there (E.g. Ytria's scanEZ is able to show all instances as well the duplicate ids of each one of them, so it must be available from the C- or C++-APIs).

I'm aware that we always can loop through "NotesDocument.Items" then ask for the item's name etc. But this is extremly ineffective esp. for large documents

  • Attach files
  • Guest
    Reply
    |
    Feb 6, 2024

    NotesDocument had a GetNextItem method in R4, which was deprecated in R4.5 for reasons already listed. It is still present, you just cannot get help for it. I came across it trying to debug a bit of code which was mangling up some rich text fields.

  • Guest
    Reply
    |
    May 8, 2020

    To join into a discussion: thanks for your input, I get your argument ("...dangerous to deal with separately..."), and it's a good point. What I am thinking of is some kind of "read-only access" but that probably cannot be enforced; on the other hand: even now I can easily mess things up going by looping the Items array. This added feature would make this only simpler ;)

  • Guest
    Reply
    |
    May 7, 2020

    It is certainly available from the C API. I think the reason they don't have a getNextItem is because most multi-item things are either useless/dangerous to deal with separately (i.e., rich text), or have alternate ways to access that are seen as more useful (i.e., attachments and MIME parts). I still think there is aan argument for having access, but it is not quite as simple or safe as it might sound. (Try deleting the second of three rich text items and you'll crash the client or server almost every time.)