I’ve got an array of about 8000 entries, which i am trying to present in a notesuiworkspace prompt. When i try to do this, the prompt method does not display the prompt. It just returns an empty variant.
However, no error is raised either. It just seems to ignore it.
Does anyone know why this is happening and whether it is just a limitation of notes? If there is a limitation and assuming this limitation is due to the size of the array, does anyone know of perhaps a check i can do before trying to display it (as it doesn’t error out)?
Subject: RE: Are there Size Limitations within the NotesUIWorkspace Prompt Method?
I don’t know whether there is a limitation there, but keyword field formula results are limited at 64KB. Are you sure the identical code works with a much shorter list?
I do have an idea how you can detect the problem. Use the Timer function – record the time before you call Prompt, then if you get the Empty result, check the time again and see whether the dialog was displayed long enough to make it plausible that the user deliberately canceled it.
Subject: RE: Are there Size Limitations within the NotesUIWorkspace Prompt Method?
Hello Andre
The code definitely works for a smaller array. The following code will display the array in a prompt. However, if you increase the upper bound by 1, it fails
Dim ws As New NotesUIWorkspace
Dim res As Variant
Dim i As Integer
Redim tester(1 To 10900) As String
For i=Lbound(tester) To Ubound(tester)
tester(i)="yqqy"
Next
res = ws.Prompt (PROMPT_OKCANCELLIST, "Title", "Msg", "", tester)
I tried using notesdatetime.timedifference to see if your suggestion works, but unfortunately, 1 second is plenty of time for people to cancel out of a prompt. However, thanks for the idea. Its not something i’d thought of.
Unfortunately, i can’t use a pickliststrings method as the view column the array gets its values from has the “Show multiple values as separate entries” selected, and selecting an entry in a picklist selects all the entries of the underlying document.
It does seem as though the restriction is similiar to the 64KB limit existing for @DBColumns. However, it is not identical. For example, i found that and @DBColumn could return 10921 entries from a notes view containing a column containing the same 4 character sequence as in the code above.
Tested it further and found that a 10 character sequence could be displayed in a prompt as long as the array was no larger than 5450, but a dbcolumn could return 5460 entries. If you increase that to a 20 character sequency, the figures drop to 2971 and 2978.
However, i always though that a string array was made up the byte size of the strings that make it up. So the above figures don’t entirely make sense to me.
Subject: RE: Are there Size Limitations within the NotesUIWorkspace Prompt Method?
What you’re saying sounds consistent with a total maximum of 64K – assuming a couple of bytes overhead per element to indicate the length of the string.
BTW when I suggested you use the Timer function, I actually meant the Timer function.
Subject: RE: Are there Size Limitations within the NotesUIWorkspace Prompt Method?
Hello Andre
I found exactly what i was after in the help file. My apologies for wasting your time.
"@DbColumn can return no more than 64K bytes of data. Use the following equations to determine how much of your data can be returned using @DbColumn.
For lookups that return text:
2 + (2 * number of entries returned) + total text size of all entries"
I’ve recoded the script to get the byte size and (just for safetys sake) and disabling the prompt attempt if the overall byte size is greater than 65000.