: 4582 | 108668 | 12353

Function to test for an empty List (LS) 
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 >>

Better control over horizontal outlines
Implement "Live Scrolling" in Mail Views
Develop and open source a high quality framework for new DBs
InViewEdit - option to show <Ctrl-click here to add new document> at top of view
AJAX Suggest to work off Full Text search
Email Chaser View
Integrate Quickr Connectors into the Lotus Notes install, just as is done for Sametime
Fix the bug of @BrowserInfo
Push out Notes.ini parameters with a Desktop policy
Have Ctrl-T open a new browser tab in the Notes Client
Connect to more than one Sametime server in Notes client
Clear All Breakpoints
Include Request_Content in DocumentContext for Web Service Providers
Ability to detach and remove file attachments from multiple emails at once
Control integrated Sametime status settings
Extend options to set preferences for Rich Text
Add @DialogBox, @PickList and @Prompt for x-pages
HTML validation and accessibility for XPages
Add 'Move to My Contacts' button to the form
Stationary usable in reply and forward of emails
Copy text to the clipboard from the Properties dialog - especially the Replica ID
Publish API to work with calendar items, tasks and contacts

IdeaJam developed by

Elguji Software Logo