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 on products and upcoming events around #dominoforever, please visit: HCL Domino Page


Status Under Consideration
Workspace Domino Designer
Categories LotusScript
Created by Guest
Created on Oct 11, 2022

Add HasElement to the NotesJSONNavigator class to test if an element exists

There is the GetElementByName method for a NotesJSONNavigator in LotusScript. A serious drawback is that it gives an error when trying to get an element that isn't there.

Please supply HasElement (or just don't generate the error).

  • Attach files
  • Guest
    May 28, 2026

    In Notes Version 14.5.1 there is ne New parameter [SuppressErrors]:
    Set el = obj.Getelementbyname("name", true) -> No Error when there ist no Element "name". Returns Nothing.

    I have not testet yet, not all users habvv 14.5.1 yet. As workoraund I have a function:
    '/**

    ' * Gibt das JSON-Element <strKey> des JSON-Objekts zurueck.

    ' * Wird benoetigt bis der Server den Paramater True bei jsnObject.Getelementbyname beruecksichtigt.

    ' * @param jsnObject JSON-Objekt dessen JSON-Element zurueckgegeben werden soll.

    ' * @param strKey Schluessel des JSON-Elements im JSON-Objekt das zurueckgegeben werden soll.

    ' * @return JSON-Element oder Nothing bei Fehler 4843.

    ' * @author sk

    ' * @version 2026-05-18

    ' */

    Private Function getJsnElementByNameInJsnObject(jsnObject As NotesJSONObject, strKey As String) As NotesJSONElement

    On Error GoTo ERROR_HANDLING

    On Error 4843 GoTo EMPTY_OBJECT

    Set getJsnElementByNameInJsnObject = jsnObject.Getelementbyname(strKey)

    Exit Function ' getJsnElementByNameInJsnObject

    ERROR_HANDLING:

    Set getJsnElementByNameInJsnObject = Nothing

    Dim eeThis As New ErrorEntry(DESIGN_AGENT, "PDAAPI/saveProjectTasks")

    Call eeThis.raiseError("", Nothing)

    Exit Function ' getJsnElementByNameInJsnObject

    EMPTY_OBJECT:

    Set getJsnElementByNameInJsnObject = Nothing

    Exit Function ' getJsnElementByNameInJsnObject

    End Function ' getJsnElementByNameInJsnObject

  • Guest
    Nov 25, 2025

    Yes, having to build in work funky error handling etc. to do this is counter intuitive. This would save developers so much time.