How to get ID if diffrent notes design element?

Posted on 2003-03-31
Medium Priority
Last Modified: 2013-12-18

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.
Question by:ad_kumar
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 6
  • 3

Expert Comment

ID: 8244797
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

Author Comment

ID: 8245230
I modified the $Formulaclass field value to 1548, but view is not showing design elements. Do I need to give some view selection formula?

Author Comment

ID: 8245281
In design mode it started showing list of design elements but in notes client it isn't showing anything in view.
Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users


Expert Comment

ID: 8247720
Pretty shure you need to close the database in both the client and designer, and then reopen it again to se the changes.

Author Comment

ID: 8251248
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.

Expert Comment

ID: 8254002
I found an article from the programmer Dan Velasco on http://www.dominopower.com/issues/issue199908/design001.html "Fun with $Formula Class" . On his page
at http://www.dominopower.com/issues/issue199908/design001.html you'll find a database for download. I think this will answer all your questions!

Accepted Solution

stltt earned 750 total points
ID: 8255959
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.

Author Comment

ID: 8259002
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 doc.name etc. are not working?

Author Comment

ID: 8259047
Yes I got the titles also using doc.getitemvalue.

Thanks stltt and GeraldEwert.

Author Comment

ID: 8259052
Thnaks a lot.

Featured Post

WordPress Tutorial 4: Recommended Plugins

Now that you have WordPress installed, understand the interface, and know how to install new parts, let’s take a look at our recommended plugins.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

  In today’s Arena we can’t imagine our lives without Internet as we are highly used to of it. If we consider our life style just for only 2 min we found that face to face communication is swapped by e-communication.  Every Where from Works place to…
JavaScript has plenty of pieces of code people often just copy/paste from somewhere but never quite fully understand. Self-Executing functions are just one good example that I'll try to demystify here.
Viewers will learn about basic arrays, how to declare them, and how to use them. Introduction and definition: Declare an array and cover the syntax of declaring them: Initialize every index in the created array: Example/Features of a basic arr…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
Suggested Courses

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question