: 4582 | 108609 | 12352

Function to test for an empty List (LS) 
New idea submissions, commenting and voting are no longer available on this site. Logins have also been disabled.
Use this IdeaSpace to post ideas about Domino Designer.

: 114
: 116
: 2
: Domino Designer
: lotusscript, designer
: Stan Rogers1150 13 Dec 2007
: / Email
There ought to be a better way of checking for an empty List than checking for a no-op Forall or trapping error 120. Perhaps extending IsEmpty to cover? I'd find that particularly helpful with class coding, when I'd often like to defer populating a List member until the first call to a method that uses it.

1) Slawek Rogulski8874 (13 Dec 2007)
2) Charles Robinson5466 (13 Dec 2007)
This has driven me nuts for a very long time.
3) Michael Sobczak2969 (31 Dec 2007)
We're talking about arrays, then? Definitely. I hate having to maintain a separate index variable and check it for 0 or -1 to see if the array is empty or not.
4) Thomas Kennedy85 (07 Jan 2008)
Michael, I always, always put arrays inside a collection object, with add and remove methods and a public integer property Count. It simplifies enormously dealing with arrays.
5) Jim Fricker43 (29 Jul 2008)
I think Stan is referring to a list, not an array, and a collection can only hold documents, a list can hold anything. eg Dim myList List as Variant
6) Erik Brooks795 (05 Mar 2010)
Here you go:

Function IsListEmpty (ListStuff As Variant) As Integer

isListEmpty = True

Forall stuff In ListStuff
If Listtag(stuff) = "" Then
isListEmpty = True
Exit Function
isListEmpty = False
Exit Function
End If
End Forall

End Function
7) Kenneth Axi1694 (03 Aug 2011)
@6 Erik: Yes, but that should be included directly into LotusScript and You shouldn't have to construct Your own function for it. I think that the function IsEmpty() definitly should be expanded to be used for Lists as well.


Welcome to IdeaJam™

You can run IdeaJam™ in your company. It's easy to install, setup and customize. Your employees, partners and customers will immediately see results.

Use IdeaJam to:

  • Collect ideas from employees
  • Solicit feedback and suggestions from employees and customers
  • Run innovation contests and competitions
  • Validate concepts
  • Use the power of "crowd-sourcing" to rank ideas and allow the best ideas to rise to the top

IdeaJam™ works with:

  • IBM Connections
  • IBM Lotus Quickr
  • Blogs and Wikis
  • Websphere Portal
  • Microsoft Sharepoint
  • and other applications.

IdeaJam has an extensive set of widgets and API's that allow you to extend and integrate IdeaJam™ with other applications.

Learn more about IdeaJam >>

XPages - allow view control to select a folder as a data source
Policy to Set File Types to Automatically Create with IBM Lotus Symphony
Explicit Policies
Process pressing of Ctrl+0 in chat window of integrated in LN 8.5 ST client
Switch beetwen opened windows by Ctrl+Tab
Separate frame for folders in navigator
Calendar Repeat Options
Add link to last page for iNotes Ultralite mode
Port the Admin Client multi-database tools to Working Sets.
Enable Editor Access Security on Auto Populate Fields on Group Documents
Enhance - Send Messages to All Invitees - feature in Calendar
Tell us whether LS and "old style" UI improvements will still be made
Live Text in the Browser/Xpages
User defined rules in DCT
Give us back a Lotusphere Europe
In Sametime Meeting, restrict chat to meeting members
Allow developers hide views from View-->>Goto to the end users in a much simple way.
Allow a database to be signed inside Designer
Server Notes.INI Settings Heirarchy

IdeaJam developed by

Elguji Software Logo