Set nnc = db.CreateNoteCollection( False ) nnc.Selectviews = True Call nnc.BuildCollection If nnc.count > 0 Then noteID = nnc.GetFirstNoteId For x = 1 To nnc.Count Set doc = db.Getdocumentbyid( Noteid ) ' create doc for each element Set newDoc = thisDB.Createdocument() newDoc.Form = "Views" If doc.Hasitem("$Title" ) Then set typestring = doc.Getfirstitem("$Title" ) If InStr( typestring.text, "|" ) Then newDoc.Viewname = Left( typestring.text, InStr( typestring.text, "|" )-1 ) newDoc.Alias = Right( typestring.text, Len( typestring.text) - InStr( typestring.text, "|" ) ) Else newDoc.ViewName = typeString.Text End If End if newDoc.elementNoteID = noteID Call newdoc.Save(True, True ) noteID = nnc.Getnextnoteid( Noteid ) Next End if
provided by Julian Robichaux at nsftools.com.
Once you have the list of views, you can now combine this with the list of views used or look in related databases to see who calls the view. This last part is also very trivial if you use a tool like Teamstudio's Configurator to search all design elements for the view name and aliases.
Let me know if you are interested in this bit as well.
No comments:
Post a Comment