Home > Domino Tips > Developer > LotusScript > LS version of @Keywords
Domino Tips:
EMAIL THIS
 TIPS & NEWSLETTERS TOPICS 

LOTUSSCRIPT

LS version of @Keywords


Gopinath Ev
01.13.2003
Rating: -3.67- (out of 5) Hall of fame tip of the month winner


Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   


This is a LotusScript version of a List comparing function @Keywords. It is enhanced to return another result other than with @Keywords. The documentation within the code is self-explanatory.



Code

Function LSKeywords( ssLSKCList1 
As Variant, ssLSKCList2 As Variant,
 vLSKCompFlag As Variant ) As Variant
%REM
Args : ssLSKList1 - List1 to check
ssLSKList2 - List2 to check
vLSKCompFlag - Flag to tell the mode 
of checking, check Desc for more details.

Desc : Extended function of @Keywords : 
if vLSKCompFlag is true - returns only 
those items from 
the second list that are found in the first
 list else returns only those items from 
the first list that are not found in the 
second list
Function Call e.g.
 LSKeywords( "3":"4":"5":"8":"4" , "5":
"6":"4":"7" , True ) returns "4":"5"
 LSKeywords( "3":"4":"5":"8":"4" , "5":
"6":"4":"7" , False ) returns "3":"8"

Called at : widely used
Calls : None
%END REM
 
 Dim ssLSKCRtnList( ), 
ssLSKRtnList( ), vLSKC  As Variant
 Dim iLSKC, iLSK As Integer
 
 iLSKC = 0
 Redim Preserve ssLSKCRtnList
( iLSKC ) As Variant
 iLSK = 0
 Redim Preserve ssLSKRtnList
( iLSK ) As Variant
 
 Forall x In ssLSKCList1
  vLSKC = True
  Forall y In ssLSKCList2
   If x = y Then
    vLSKC = False
    Redim Preserve ssLSKRtnList
( iLSK ) As Variant
    ssLSKRtnList( iLSK ) = y
    iLSK = iLSK + 1
   End If
  End Forall
  If vLSKC Then
   Redim Preserve ssLSKCRtnList
( iLSKC ) As Variant
   ssLSKCRtnList( iLSKC ) = x
   iLSKC = iLSKC + 1
  End If
  
 End Forall
 
 If vLSKCompFlag Then
  LSKeywords = ssLSKRtnList
 Else
  LSKeywords = ssLSKCRtnList
 End If
 
End Function
  

Rate this Tip
To rate tips, you must be a member of SearchDomino.com.
Register now to start rating these tips. Log in if you are already a member.




Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   


RELATED CONTENT
LotusScript
Create a non-specified date picker with LotusScript code
LotusScript accesses clipboard to view copied Notes documents
LotusScript action button manages Lotus Notes mail files
LotusScript sorts a Lotus Notes document collection
Display Lotus Notes user group membership details in a tree view
Alternate version of @Command forwards subform via LotusScript
Process large arrays in Notes forms without undue coding or testing
How to use LotusScript to modify a Lotus Notes view selection
Display a custom message box using a LotusScript-generated button
Debug Lotus Notes documents using extracted data

LotusScript
Customize the principal field of outgoing email messages
Create a non-specified date picker with LotusScript code
Resolve Notes 8 migration error: 'Database has not been opened yet'
LotusScript accesses clipboard to view copied Notes documents
LotusScript action button manages Lotus Notes mail files
LotusScript sorts a Lotus Notes document collection
Display Lotus Notes user group membership details in a tree view
Alternate version of @Command forwards subform via LotusScript
Process large arrays in Notes forms without undue coding or testing
How to use LotusScript to modify a Lotus Notes view selection

Lotus Notes Domino Formula Language
Top 10 Formula language tips
Using Formula language code to sort Lotus Notes messages by subject
How to create dynamic JavaScript in Notes Domino without formulas
Stop response documents from showing in a Lotus Notes form
Formula language button manages Deny Access list searches
Add a program doc to compact Lotus Notes databases automatically
Top 10 Lotus Notes Domino programming and development tips of 2007
Retrieve Lotus Notes names from a nested group using @DBLookup
Top 5 @DBLookup tips
Create a computed Lotus Notes field to list Personal Address Book names

RELATED RESOURCES
2020software.com, trial software downloads for accounting software, ERP software, CRM software and business software systems
Search Bitpipe.com for the latest white papers and business webcasts
Whatis.com, the online computer dictionary

DISCLAIMER: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.



Domino & Lotus Notes Security Solutions: Authentication, Antispam, Encryption and Antivirus
HomeTopicsITKnowledge ExchangeTipsAsk the ExpertsMultimediaWhite PapersDomino IT Downloads
About Us  |  Contact Us  |  For Advertisers  |  For Business Partners  |  Site Index  |  RSS
SEARCH 
TechTarget provides enterprise IT professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective IT purchase decisions and managing their organizations' IT projects - with its network of technology-specific Web sites, events and magazines.

TechTarget Corporate Web Site  |  Media Kits  |  Reprints  |  Site Map




All Rights Reserved, Copyright 1999 - 2008, TechTarget | Read our Privacy Policy
  TechTarget - The IT Media ROI Experts