: 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)
Absolutely!
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
Else
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 >>


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






IdeaJam developed by

Elguji Software Logo