List of Subforms in a DB

Hello Eeveryone,I would like to get a list of all the subforms in a database and compare it with a string so that my process will not generate another subform with a name that already exists in the database.

I thought about NotesNoteCollection,I could say selectsubforms=true,but that would select all the subforms in the Db.There is a selection method property in NotesNoteCollection wherein I can specify a formula for the NoteCollection.

My question is how to generate a list of names of all the subforms and compare it with a string to prompt the user to tell that this subform already exists.

I would appreciate any ideas on this.

If you need any more clarofications,please reply.

Thanks,

Sreeni.

Subject: RE: List of Subforms in a DB

You could obviously run thru the collection and build a list of the subform names, or restrict the search results by testing the $Title field.

But I don’t understand why you don’t just use NotesDatabase.GetForm to see whether a subform with the proposed name exists.

Subject: List of Subforms in a DB

Look at the Forms property of the NotesDatabase class and the NotesForm object including its IsSubForm property.