Solved

size limits in lotus script

Posted on 2008-10-26
4
747 Views
Last Modified: 2013-12-18
I am getting an apparrent size error on the following line of code. CURGROUP is a delimited string of user groups and its users (example: Marketing -  John Smith) but it's unsorted.  All it says is Operation failed. If I remove some of the data from the string it works.

NEWGROUPLIST=Evaluate(|@Sort(@Explode("| + CURGROUP + |";";"))|,doc)

Assuming it is a size issue on the string, what is my best way of doing a sort? Pull it into an array?
0
Comment
Question by:BillTr
  • 3
4 Comments
 
LVL 46

Expert Comment

by:Sjef Bosman
ID: 22808480
If CURGROUP is a value in a field on the document, you could sort its contents using LotusScript. Here's a QuickSort function:

http://www.11tmr.com/11tmr.nsf/D6Plinks/MWHE-695LAC
0
 

Author Comment

by:BillTr
ID: 22811824
Hi Sjef,
 I build CURGROUP by doing a fieldgettext on 3 fields on the form and then concatenating the 3 text strings. Could I add these to an array and then pass the array to your function?
0
 
LVL 46

Accepted Solution

by:
Sjef Bosman earned 500 total points
ID: 22811956
If a field is a multi-value field, you'd get an array immediately if you use NotesDocument.GetItemValue("Field1")

Example:
Dim v As Variant

v= doc.GetItemValue("Field1")
v= ArrayAppend(v, doc.GetItemValue("Field2"))
v= ArrayAppend(v, doc.GetItemValue("Field3"))

Call QuickSort(v, 0, Ubound(v))
0
 
LVL 46

Expert Comment

by:Sjef Bosman
ID: 22872271
Sorted?  ;-)
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Over the years I have built up my own little library of code snippets that I refer to when programming or writing a script.  Many of these have come from the web or adaptations from snippets I find on the Web.  Periodically I add to them when I come…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
Windows 10 is mostly good. However the one thing that annoys me is how many clicks you have to do to dial a VPN connection. You have to go to settings from the start menu, (2 clicks), Network and Internet (1 click), Click VPN (another click) then fi…

867 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now