can anybody tell me the difference between a normal document and a design document?
I wan’t to copy a design document (a form; access via NotesNoteCollection) to a another database. That works fine. But now I want to display the design element like a normal document in a view.
Subject: RE: difference between design element and document
The difference is not in any of the items; like the last modified date and a few other pieces of data, it’s in a header; the value is called the “note class”.
There’s not a way to change the note class of the note (at least not easily that I know of), but you can change the view to show notes of different classes than the default (“document” class). A code sample is in this download: Domino Design Library Examples.
Subject: RE: difference between design element and document
Thanks Andre!
I have heared/read something about the Note_Class a long time ago. I know it’s not possible to change the value by pure LotusScript…
… but I think I remember about changing the value by the C-API… !!!
I know about the way to display design elements in a view. But that’s not the right solution for me. My problem is, that the copied design element could have have the same name.
Therefore I would change the Note_Class to the value of a “doucment”…
Subject: RE: difference between design element and document
Hello Tom,
I can’t see the problem here. It is perfectly possible to have several design elements of some sort sharing the same name (from the API anyway. The Notesclient don’t always let you have same class elements with the same name). You could even have several elements being “default” of its kind (using the api).
Subject: RE: difference between design element and document
As Daniel notes, if you’re processing design elements with code, there’s nothing to prevent duplicate names.
To answer the specific question you asked: If you’re copying design elements with code, you can get a handle to them wherever you’re copying them from (using NotesNotesCollection for instance), get the design note as a NotesDocument, create a document in your destination (note class “document”) and then copy over all the items from the design note.
There’s probably also a C API call you could use to conver the note after the fact, but I don’t know offhand what it is, and you can search for “note class” in the API documentation as well as I can. I just don’t understand what the point is of doing this. What use is a design element that’s been translated to a document note? It seems like a waste of storage space.
What’re you trying to accomplish with these manipulations? What’s the end user requirement? It’s possible there’s a different way to approach the problem.
Subject: RE: difference between design element and document
Thanks a lot!
It’s only a little project I’m working on. I want to understand how the NotesClient and the NotesDesigner works internally.
We often have a problem when we change a script library. We get an error like “error on external name ”.
With this little tool I want to convert a design element to a notes document and vice versa. Within this process I like to change several values to possibly prevent this problem.
So if I understand you right, I can copy all design elements to a target database. The Note_Class can be left intact, cause there is no naming problem.
If I want to convert the design elements to notes document and vice versa, I have to use the C-API.
To convert a design element to a notes document I can use the “CreateNewDocument” in the NotesDatabaseClass. To reconvert this document I have to use the C-API.
Subject: RE: difference between design element and document
There’s nothing you can do to the items of a document note in LotusScript, that you can’t do to the items of a design note. Changing the design notes into document notes doesn’t gain you anything.
I believe you’re getting this error because you change the script library and don’t recompile the agent or whatever other code calls it. The calling script object is incompatible with the library because you have, perhaps, changed the datatype of a global variable or of a function argument.
You need to recompile the calling code using, for instance, tools/recompile all in Designer. You can also use the C API to compile individual design notes, if you don’t want to touch the script libraries.