How to get ID if diffrent notes design element?


Is there any way to get notes Id of diffrent design elements (like forms, views, agents etc.) programeticaly (Preferably in Lotus Script)?

Also, can I goto diffrent design elements of a database, one by one in Lotus script?

Thanks in advance.
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Using built in classes this is only possible for view elements.

Here's an example that updates a view to show design elements instead of documents (cannot remember where I found it, but have seen it several places on internet):

     '--This agent changes the $FormulaClass field of a view to "4" to show Forms and Subforms
     Dim session As New NotesSession
     Dim db As NotesDatabase
     Dim view As NotesView
     Dim doc As NotesDocument
     Set db = session.CurrentDatabase
'--CUSTOMIZE:Change the name of the view below to customize
     Set view= db.GetView("FormView")
'--You now have a handle on the design element of the view.
     Set doc = db.GetDocumentByUNID(view.UniversalID)
'--CUSTOMIZE: The code on the line below changes the $FormulaClass field.
'--See chart above for other values.
     Dim value As String
     value = Inputbox$ ("", "", "1548")
     Call doc.ReplaceItemValue("$FormulaClass", value)
     doc.Save True, True

Enjoy !! There is allot of stuff to dig into when you get this view working.

It would be possible to find the universal ID via Document properties on the design elements - but this might bot be what you are looking for.

This will save you some work:
Categorize the first column and insert this formula:
@If(     $Flags="3FY"; "Shared Folders";
          @Left($Flags; 2)="FY"; "Shared Folders";
          $Flags="3PFY"; "Shared Folders";
          $Flags="3FYV"; "Private Folders";
          @Left($Flags;2)="CU"; "Subforms";
          $Flags="Y"; "Views";
          $Flags="PY"; "Views";
          $Flags="G3"; "Navigator";
          $Flags="C"; "Forms";
          $Flags="c"; "Forms";
          @Left($Flags; 2)="CD"; "Forms";
          @Left($Flags; 3)="fl3"; "Shared Agents";
          @Left($Flags; 3)="fL3"; "Shared Agents";
          @Left($Flags; 2)="f3"; "Shared Agents";
          @Left($Flags; 2)="fP"; "Shared Agents";
          @Left($Flags; 2)="Sf"; "Shared Agents";
          $Flags="P"; "Shared Fields";
          @Left($Flags; 3)="m34"; "Outlines";
          $Flags="s34Q"; "Script Library";
          $Flags="Cy34Q"; "Shared Actions";
          $Flags="t34Q"; "Database Script";

          @Left($Flags; 4)="34Ci"; "Image Resources";
          @Left($Flags; 5)="C34WQ"; "Pages";

          @IsAvailable($TABLEFORMAT); "Views";

          "- Unknown -")

Second column can be e.g. $Title
ad_kumarAuthor Commented:
I modified the $Formulaclass field value to 1548, but view is not showing design elements. Do I need to give some view selection formula?
ad_kumarAuthor Commented:
In design mode it started showing list of design elements but in notes client it isn't showing anything in view.
Cloud Class® Course: Amazon Web Services - Basic

Are you thinking about creating an Amazon Web Services account for your business? Not sure where to start? In this course you’ll get an overview of the history of AWS and take a tour of their user interface.

Pretty shure you need to close the database in both the client and designer, and then reopen it again to se the changes.
ad_kumarAuthor Commented:
I colsed and reopened both notes client and designer.
As earliar it shows design elements in that view, in designer but not in client.
And also not setting those in agent when I say getfirstdocument/getfirstentry.
I found an article from the programmer Dan Velasco on "Fun with $Formula Class" . On his page
at you'll find a database for download. I think this will answer all your questions!
I just testet again with the database I had - you need to press Shift-F9 to force a view index rebuild after setting the $FormulaClass.

I recognize the link Gerald put here. This is where I got all the info from.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
ad_kumarAuthor Commented:
Shift_F9 solved the problem of displaying elements in view, thanks a lot.
Also I am able to pick elemets IDs using doc.UniversalID property.
How can I find elements' title also, doc.title etc. are not working?
ad_kumarAuthor Commented:
Yes I got the titles also using doc.getitemvalue.

Thanks stltt and GeraldEwert.
ad_kumarAuthor Commented:
Thnaks a lot.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Lotus IBM

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.