Urgent Help Reuired on LS Sorting and unique

Hi My requirements are to sort the data which i am taking in an array and the remove the duplicate entries from the array and then print it in the entries,everything is fine but i am not able to think for sorting and unique.I am apsting some of my code,kindly help me out to resolve this.

Sub Click(Source As Button)

Dim w As New notesuiworkspace

Dim ss As New NotesSession

Dim db1 As notesdatabase



Dim uidoc As notesuidocument

Dim thisdoc As notesdocument

Dim note As notesdocument

'Dim date1 As Variant

Dim datetime As New NotesDateTime( "" )

Dim efromD As New NotesDateTime( "" )

Dim etoD As New NotesDateTime( "" )

Dim excelNewWkbk As Variant

Dim xlRange As String

Dim Temp(30) As String



pth="E:\IS Help Desk Local Copy 13 dec2004\IS Help Desk Changed copy 13 dec 2004\IRequest-test.nsf"	

Set db1=New NotesDatabase(srv,pth)





Set uidoc=w.CurrentDocument

Set udoc = uidoc.Document

Set thisdoc = uidoc.Document

















Set view=db1.getview("Test")







n=3

c=2

a=1

Set collection=db1.getview("Profile")

Set doc1=collection.GetFirstDocument



Do While Not doc Is Nothing 

	

			

	

	

	

	datetime.LSLocalTime=doc.logged(0)

	

	

	efromD.LSLocalTime=thisdoc.efromD(0)

	etoD.LSLocalTime=thisdoc.etoD(0)

	

	If  dateTime.DateOnly>=efromD.dateonly Then

		If  dateTime.DateOnly<=etoD.dateonly Then		

			

			



	

			

				

			

				Array=doc.r_assignedto(0)'c is used for incrementing the rows values

				array1=doc.r_category(0)

				'Here in array in need to sort the data and also do not need the duplicate value

                                     Like"A,B,C,A,A,B,B------

                                     I need only "A,B,C 

			

			

			Assigned=doc.r_assignedto(0)+doc.r_category(0)

			Set doc1=view.getdocumentbykey(Assigned)

			Set vc = view.GetAllEntriesByKey(Assigned)

			B=vc.count

			

						

			

		End If

	End If

	

	

	

	

	Set doc = view.getnextdocument(doc)

Loop

	End Sub

Subject: Urgent Help Reuired on LS Sorting and unique

I usually get the code from the Sort member list button in the Name and Address book, it sorts and gets rid of duplicates

Subject: RE: Urgent Help Reuired on LS Sorting and unique

but I need to store the value in the array in the while loop,and in that loop only i have to sort and remove the duplicate entries.and xtemp is no an array. FTemp=“@Unique(Xtemp)”

Means i am assigning the values on run time and then soring and removing the duplicates

Subject: RE: Urgent Help Reuired on LS Sorting and unique

Hi,

http://searchdomino.techtarget.com/tipsSearchResults/1,289494,sid4,00.html?query=sort+and+array&type=tip&x=20&y=0

should help you out. You first have to be registered (for free)…

You also should have a look into the Version 4 and 5 forum.

Cheers,

Markus