Skip to main content
This forum is closed to new posts and responses. New discussions are now taking place in the IBM Developer Answers forum.
 
developerWorks
AIX and UNIX
Information Mgmt
Lotus
New to Lotus
Products
How to buy
Downloads
Live demos
Technical library
Training
Support
Forums & community
Events
Rational
Tivoli
WebSphere
Java™ technology
Linux
Open source
SOA and Web services
Web development
XML
My developerWorks
About dW
Submit content
Feedback



developerWorks  >  Lotus  >  Forums & community  >  Notes/Domino 6 and 7 Forum

Notes/Domino 6 and 7 Forum

developerWorks

  

PreviousPrevious NextNext

RE: Need help with a loop
Stan Rogers 23.Sep.17 10:44 PM a Web browser
Domino Designer All Releases All Platforms


Right. I don't have a working copy of Designer around to test this, so you'll need to be very careful looking at parentheses and checking the syntax and so forth. It's been a while; I'm out of practice. It should work, in principle, if we are allowed to assume that your "omit list" cannot contain values that are not in your "parse list", and that you've arranged things so they aren't already overbooked. You can sort of get around the limitations by making the code a lot longer, sloppier, slower, and harder to maintain.

Formula Language is a little bit fragile here because you can't write directly into an array element. The strategy, then, will involve creating a new array (list) by popping values off of the existing arrays one at a time. We only compare the first values of each of the sorted lists. Because this involves iteration, it is not backwards-compatible to Notes R5 or earlier. (An R5 version is possible, but it would involve the nested @If from hell and would run out of room in a hurry. You'd be much better off using Jonathan's solution than trying to go there, even if it is a horrible user experience.)

If the "parse list" value is not the same as the "omit list" value, we add it to the "out list" and remove it from the "parse list". if it *is* the same, then we simply remove it from both lists without adding it to the "out list". We keep doing that until the "omit list" is empty.

Finally, we add whatever is left in the "parse list" to the "out list", and present a trimmed version of that list to the user.


parseList := @Trim(@Sort(whatever; [ASCENDING]));
omitList := @Trim(@Sort(aDifferentWhatever; [ASCENDING]));
outList := "";
@While(omitList != "";
@If(parseList[1] != omitList[1];
@Do(outList := outList : parseList[1];
parseList := @Subset(parseList; 1 - @Elements(parseList)));
@Do(parseList := @Subset(1 - @Elements(parseList);
omitList := @Subset(1 - @Elements(omitList))));
outList := outList : parseList;
@Trim(outList)

Again, I don't have Designer handy and can't syntax-check it or test it, but the idea is there and sound(ish). It ain't pretty, elegant, well-dressed or graceful, and you may find a better way given an idea of how it might be made to work. No guarantees, and good luck.




Need help with a loop (Jeremy W Deal 21.Sep.17)
. . RE: Need help with a loop (Jeremy W Deal 21.Sep.17)
. . . . This should do it (Carl Tyler 22.Sep.17)
. . . . . . RE: This should do it (Jeremy W Deal 22.Sep.17)
. . . . RE: Need help with a loop (Stan Rogers 23.Sep.17)
. . RE: Need help with a loop (Jonathan Cohen 23.Sep.17)
. . . . RE: Need help with a loop (Stan Rogers 23.Sep.17)
. . RE: Need help with a loop (Phil M Jones 25.Sep.17)


Document Options






  Document options
Print this pagePrint this page

Search this forum

Forum views and search


  Forum views and search
Date (threaded)
Date (flat)
With excerpt
Author
Category
Platform
Release
Advanced search

Member Tools


RSS Feeds

 RSS feedsRSS
All forum posts RSS
All main topics RSS
More Lotus RSS feeds

Resources

 Resources
Forum use and etiquette
Native Notes Access
Web site Feedback

Lotus Support

 Lotus Support
IBM Support Portal - Lotus software
Lotus Support documents
Lotus support by product
Lotus support downloads
Lotus support RSS feeds

Wikis

 Wikis
IBM Composite Applications
IBM Mashup Center
IBM Connections
IBM Connections Cloud Developers
IBM Docs
IBM Forms
IBM Mobile Connect
IBM Sametime
IBM SmartCloud for Social Business
IBM Web Experience Factory
Lotus Domino
Lotus Domino Designer
Lotus Expeditor
Lotus Foundations
Lotus iNotes
Lotus Instructor Community Courseware
Lotus Notes
Lotus Notes & Domino Application Development
Lotus Notes Traveler
Lotus Protector
Lotus Quickr
Lotus Symphony
IBM Web Content Manager
WebSphere Portal

Lotus Forums


 Lotus Forums
Notes/Domino 9.0
Notes/Domino 8.5 + Traveler
Notes/Domino XPages development forum
Notes/Domino 8
Notes/Domino 6 and 7
IBM Connections
IBM Mobile Connect
IBM Sametime
IBM SmartCloud Notes
Lotus Enterprise Integration
Lotus Protector
Lotus Quickr
Lotus SmartSuite