Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

size limits in lotus script

Posted on 2008-10-26
4
Medium Priority
?
759 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 2000 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

This script will sweep a range of IP addresses (class c only, 255.255.255.0) and report to a log the version of office installed. What it does: 1.)      Creates log file in the directory the script is run from (if it doesn't already exist) 2.)      Sweep…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an anti-spam), the admin…
Look below the covers at a subform control , and the form that is inside it. Explore properties and see how easy it is to aggregate, get statistics, and synchronize results for your data. A Microsoft Access subform is used to show relevant calcul…

783 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