Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

"Entry not in design list error" when accessing a newly-created view

256 views
Skip to first unread message

powe...@my-deja.com

unread,
Feb 9, 2000, 3:00:00 AM2/9/00
to
I am creating an application which will
dynamically create and delete views for different
users. I create and populate a view on the fly
by iterating through the document.AddToFolder
method, and try to view it in a picklist using the
workspace.PickListStrings or PickListCollection
methods. When I run the script, the picklist
window appears, but does not contain my view.
Instead, I get an "Entry not in design list"
error. I have checked this in the debugger
numerous times to confirm that the correct view is
being created, inheriting its desgin from the
apporporiate default view, and being populated
with the correct documents. All appears well. It
seems as though the design list is not being
refreshed when the view is created? Has anyone
experienced this problem? If so, does it appear
to be a bug? Is there a work-around? Any help
would be greatly appreciated.

Thanks in advance,

Steve


Sent via Deja.com http://www.deja.com/
Before you buy.

Marijana Puljak

unread,
Feb 10, 2000, 3:00:00 AM2/10/00
to
Maybe this will help you (tip from lotus411.com):


TITLE: Simulating a dynamic view using folders
Author: Shawn Conlin, Retail Store Systems

I have seen a number of situations where it would be
great to have a user answer a few prompted questions
and have the view display the corresponding documents.
Views do not handle dynamics very well, but I found
that folders work wonderfully. I recommend setting the
folder up as Shared, private on first use, but it must be
stored in the server copy. You can then setup 2 scripts
one that empties the folder and one that populates it.
You could also delete the view instead of clearing it.

When I set it up, I established the scripts as agents
that run from buttons in the folder, this allows the
user to perform multiple searches without having to
close and open the folder. Below I have included
sample script and @functions for the button and agents.

The folder can be categorized or display the docs
any way that is desired. I coded the Empty agent
to remove docs from the bottom up, as I have
found this method to work better when working
from categorized views.

'Programming behind button to run the scripts
user := @Name([CN];@PickList([Name]: [Single]));
rdate := @Prompt([OKCANCELEDIT];"Enter Start Date";"Enter start date for the
report:" + @Char(13) + "The database contains information from the past 60
days only.";"");
@Environment("TRName"; user);
@Environment("TRDate"; rdate);
@PostedCommand([ToolsRunMacro]; "(EmptyFolder)");
@PostedCommand([ToolsRunMacro]; "(CreateTimeReport)")


'Add entries to folder agent
Sub Initialize
Dim W As New NotesUIWorkspace
Dim S As New NotesSession
Dim CurDB As NotesDatabase
Dim LView As NotesView
Dim TFolder As NotesView
Dim DColl As NotesDocumentCollection
Dim Doc As NotesDocument
Dim TRDate As String
Dim TRName As String

Set CurDB = S.CurrentDatabase
Set LView = CurDB.GetView("(TimeLookup)")
Set TFolder = CurDB.GetView("Time Report")

TRName = S.GetEnvironmentString("TRName")
TRDate = S.GetEnvironmentString("TRDate")

Set DColl = LView.GetAllDocumentsByKey(TRName, True)
If DColl.Count > 0 Then
Set Doc = DColl.GetFirstDocument
While Not(Doc Is Nothing)
If Datevalue(Doc.EntryDate(0)) >= Datevalue(TRDate) Then
Call Doc.PutInFolder("Time Report")
End If
Set Doc = DColl.GetNextDocument(Doc)
Wend
End If
Call TFolder.Refresh
End Sub

'Empty Folder Agent
Sub Initialize
Dim S As New NotesSession
Dim CurDB As NotesDatabase
Dim TFolder As NotesView
Dim Doc As NotesDocument
Dim TDoc As NotesDocument

Set CurDB = S.CurrentDatabase
Set TFolder = CurDB.GetView("Time Report")
Set Doc = TFolder.GetLastDocument

While Not(Doc Is Nothing)
Set TDoc = Doc
Set Doc = TFolder.GetPrevDocument(Doc)
Call TDoc.RemoveFromFolder("Time Report")
Wend
Call TFolder.Refresh
End Sub

<powe...@my-deja.com> wrote in message news:87seas$pr0$1...@nnrp1.deja.com...

0 new messages