ArrayAppend

Iam facing one problem with the History of the document

The application is a web based application.

There is a document with information tab and history tab.

My problem is with History tab. In this tab we are storing all the edit history and created history information as in table.

Now the scenario is if i edited the document it will stores my name and date in the below table. It is appending as a array to that . Here in the script library code , they are using Arrayappend function for that.

Now i got the requirement that i need to show the history with last 25 people edited information in history tab.

Subject: ArrayAppend

Hi,

take a look at the function: @Subset. (If formula language is okay)

Otherwise, try the “FOR” statement. The Lotus Notes Desigern Help will tell you how to use these functions…

Subject: RE: ArrayAppend

Thanks for the information,

But already there is completely lotus script code is there in that function. So i need in script .

HOw can we make use of the for or forall here in this case to restrict to 25 only.

Subject: RE: ArrayAppend

Could you have a display-only field for the 25 names, using a QueryOpen event perhaps to set the field to the required 25 entries from the stored field (first 25, last 25, whatever)

Cheers,

Adrian

Subject: RE: ArrayAppend

Try this:

Dim ar() As Variant

Dim max As Integer

max = 24 ' zero based

If max > Ubound(YOUR_ARRAY) Then

	' Not enough entries available

	doc.HISTORY_FIELD = YOUR_ARRAY

Else

	For x = 0 To max

		Redim Preserve ar(x)

		ar(x) = YOUR_ARRAY(x)

	Next

	doc.HISTORY_FIELD = ar

End If	

I think this should work