Uniquely identifying text in array

Hi I am having an array,now i need to sort and them remove the duplicate the entries.As i am not very good in Lotus Scripting and i got hang up in Loops and could not think further.

Can some one help me out.

My array

rcategory(0)=“Allan”

rcategory(1)=“Dali”

rcategory(2)=“Dali”

rcategory(3)=“Donald”

rcategory(4)=“Allan”

rcategory(5)=“Dali”

From the above i want to remove the duplicate entries and print the unique entries.

rcategory(2)=“Dali”

rcategory(4)=“Allan” i want to remove these entries

rcategory(5)=“Dali”

Subject: Uniquely identifying text in array

Use ArrayUnique(sourceArray [,compMethod ]) To remove the duplicatesAnd try some of the sort functions posted in LDD for eample:

http://www-10.lotus.com/ldd/nd6forum.nsf/55c38d716d632d9b8525689b005ba1c0/c7db2be8db89eb3a85256f39007557f1?OpenDocument

http://www-10.lotus.com/ldd/nd6forum.nsf/55c38d716d632d9b8525689b005ba1c0/79b77cd1e3d6a6ed85256ed2005eb67c?OpenDocument&Highlight=0,array,sort

Subject: RE: Uniquely identifying text in array

These examples are for swaping/Sorting,but i need to remove the duplicates from an arrayLike my array is

rcategory(0)=“Allan”

rcategory(1)=“Dali”

rcategory(2)=“Dali”

rcategory(3)=“Donald”

rcategory(4)=“Allan”

rcategory(5)=“Dali”

From the above i want to remove the duplicate entries and print the unique entries.

I want to remove the following entries from the array

rcategory(2)=“Dali”

rcategory(4)=“Allan”

rcategory(5)=“Dali”

Subject: RE: Uniquely identifying text in array

From the Help:

ArrayUnique function

Removes duplicate elements from an Array.

Syntax

ArrayUnique(sourceArray [,compMethod ])

Elements

sourceArray

Array of any type.

compMethod

Optional Integer specifying the type of comparison to use when searching for the delimiter, if the elements are strings.

Subject: RE: Uniquely identifying text in array

Still i could not get itIS there is some script to remove the duplicates

Subject: RE: Uniquely identifying text in array

The following is the code for an agent and the results after running as shown in the ‘Debug Lotus Script’ :-

Subject: RE: Uniquely identifying text in array

Is arrayunique function runs on R5 also,as my application is running on many locations some where it is on R5 and some where it is on R6.What will be the solution for R5

Regards

Dali

Subject: RE: Uniquely identifying text in array

ArrayUnique works on R5 also.Go ahead,Try it.

Subject: RE: Uniquely identifying text in array

it does not,as i checked from the R5 help also

Subject: RE: Uniquely identifying text in array

For a cross version Unique function, go to the Sandbox and download the Domino Design Library database:

http://www-10.lotus.com/ldd/sandbox.nsf/ecc552f1ab6e46e4852568a90055c4cd/816d64935ee8842485256c680051b592

Subject: RE: Uniquely identifying text in array

See Maybe its not there in the R5 help but if this method didnt work on R5 then it WOULD have been written explicitly in the Help File.

Atleast try it.

Work on the code and then test it.

Subject: RE: Uniquely identifying text in array

no it does not work,it gives error