******************* From C API Help ********************* Design Flag Patterns The Design Flag Pattern provides a way to extend the specification of certain NOTE_CLASS_xxx types when searching for specific design notes. #define DFLAGPAT_EXAMPLE "(+AB-C*DE" /* This is an example of a Design Flag Pattern definition - see "stdnames.h" */ Each Design Flag Pattern definition follows a specific format. This format consists of a series of Design Flag values and the logical operators used to interpret them. When a combination of at least two logical operators is used, the combination operator "(" as well as placeholders for any unused logical operator must also be included. If the need for only one logical operator is required for the complete Design Flag Pattern definition, neither the use of the combination operator "(", nor the use of placeholders for the unused operators is needed, but may be implemented for the sake of consistency and still conform to the specified format criteria. The operators consist of the following: "+" denotes ANY of the flags that follow. "-" denotes NONE of the flags that follow. "*" denotes ALL of the flags that follow. "(" denotes use of any combination of the above, including "place holders" for unused logical operators. Examples of how to interpret typical Design Flag Pattern values: "(+AB-C*DE" would be interpreted as (A OR B) AND (NOT C) AND (D AND E) Where A, B, C, D and E are Design Flag values defined in the C API header file "stdnames.h". This Design Flag Pattern uses the combination operator "(" and all of the logical operators "+, -, *". In this example, each logical operator is followed by one or more Design Flag values. "(+AB-C*" would be interpreted as (A OR B) AND (NOT C) When any combination of logical operators is used, the combination operator "(", as well as place holders for any unused logical operator must also be included. In this example, since no Design Flags follow the logical operator "*", it is defined as a place holder and must be present in order for the Design Flag Pattern definition to be interpretable. "(+-Q*", is equivalent to "-Q", either would be interpreted as (NOT Q) These two Design Flag Pattern definitions are identical and correct. The first, "(+-Q*" uses the combination operator "(" and placeholders for the logical operators "+" and "*". Again, the "+" and "*" are defined as place holders because no Design Flag values follow them. If the definition of a Design Flag Pattern needs only one logical operator, as in the example above, neither the use of the combination operator "(", nor the use of place holders for the unused operators is required, therefore (NOT Q) can be correctly defined as "-Q" as well as "(+-Q*". The creation of any Design Flag Pattern definition that does not conform to this format criteria will not be interpretable. A list of common Design Flag Patterns and Design Flags can be found in the file "stdnames.h". ---------------------------------------------------------------------------------------------------------- ******************* From stdnames.h FILE ********************* #define DESIGN_FLAGS "$Flags" /* Please keep these flags in alphabetic order (based on the flag itself) so that we can easily tell which flags to use next. Note that some of these flags apply to a particular NOTE_CLASS; others apply to all design elements. The comments indicate which is which. In theory, flags that apply to two different NOTE_CLASSes could overlap, but for now, try to make each flag unique. */ #define DESIGN_FLAG_ADD 'A' /* FORM: Indicates that a subform is in the add subform list */ #define DESIGN_FLAG_ANTIFOLDER 'a' /* VIEW: Indicates that a view is an antifolder view */ #define DESIGN_FLAG_BACKGROUND_FILTER 'B' /* FILTER: Indicates FILTER_TYPE_BACKGROUND is asserted */ #define DESIGN_FLAG_INITBYDESIGNONLY 'b' /* VIEW: Indicates view can be initially built only by designer and above */ #define DESIGN_FLAG_NO_COMPOSE 'C' /* FORM: Indicates a form that is used only for */ /* query by form (not on compose menu). */ #define DESIGN_FLAG_CALENDAR_VIEW 'c' /* VIEW: Indicates a form is a calendar style view. */ #define DESIGN_FLAG_NO_QUERY 'D' /* FORM: Indicates a form that should not be used in query by form */ #define DESIGN_FLAG_DEFAULT_DESIGN 'd' /* ALL: Indicates the default design note for it's class (used for VIEW) */ #define DESIGN_FLAG_MAIL_FILTER 'E' /* FILTER: Indicates FILTER_TYPE_MAIL is asserted */ #define DESIGN_FLAG_PUBLICANTIFOLDER 'e' /* VIEW: Indicates that a view is a public antifolder view */ #define DESIGN_FLAG_FOLDER_VIEW 'F' /* VIEW: This is a V4 folder view. */ #define DESIGN_FLAG_V4AGENT 'f' /* FILTER: This is a V4 agent */ #define DESIGN_FLAG_VIEWMAP 'G' /* VIEW: This is ViewMap/GraphicView/Navigator */ #define DESIGN_FLAG_FILE 'g' /* FORM: file design element */ #define DESIGN_FLAG_OTHER_DLG 'H' /* ALL: Indicates a form that is placed in Other... dialog */ #define DESIGN_FLAG_JAVASCRIPT_LIBRARY 'h' /* Javascript library. */ #define DESIGN_FLAG_V4PASTE_AGENT 'I' /* FILTER: This is a V4 paste agent */ #define DESIGN_FLAG_IMAGE_RESOURCE 'i' /* FORM: Note is a shared image resource */ #define DESIGN_FLAG_JAVA_AGENT 'J' /* FILTER: If its Java */ #define DESIGN_FLAG_JAVA_AGENT_WITH_SOURCE 'j' /* FILTER: If it is a java agent with java source code. */ #define DESIGN_FLAG_MOBILE_DIGEST 'K' /* to keep mobile digests out of form lists */ #define DESIGN_FLAG_CONNECTION_RESOURCE 'k' /* Data Connection Resource (DCR) for 3rd party database */ #define DESIGN_FLAG_LOTUSSCRIPT_AGENT 'L' /* FILTER: If its LOTUSSCRIPT */ #define DESIGN_FLAG_DELETED_DOCS 'l' /* VIEW: Indicates that a view is a deleted documents view */ #define DESIGN_FLAG_QUERY_MACRO_FILTER 'M' /* FILTER: Stored FT query AND macro */ #define DESIGN_FLAG_SITEMAP 'm' /* FILTER: This is a site(m)ap. */ #define DESIGN_FLAG_NEW 'N' /* FORM: Indicates that a subform is listed when making a new form.*/ #define DESIGN_FLAG_HIDE_FROM_NOTES 'n' /* ALL: notes stamped with this flag will be hidden from Notes clients We need a separate value here because it is possible to be hidden from V4 AND to be hidden from Notes, and clearing one should not clear the other */ #define DESIGN_FLAG_QUERY_V4_OBJECT 'O' /* FILTER: Indicates V4 search bar query object - used in addition to 'Q' */ #define DESIGN_FLAG_PRIVATE_STOREDESK 'o' /* VIEW: If Private_1stUse, store the private view in desktop */ #define DESIGN_FLAG_PRESERVE 'P' /* ALL: related to data dictionary */ #define DESIGN_FLAG_PRIVATE_1STUSE 'p' /* VIEW: This is a private copy of a private on first use view. */ #define DESIGN_FLAG_QUERY_FILTER 'Q' /* FILTER: Indicates full text query ONLY, no filter macro */ #define DESIGN_FLAG_AGENT_SHOWINSEARCH 'q' /* FILTER: Search part of this agent should be shown in search bar */ #define DESIGN_FLAG_REPLACE_SPECIAL 'R' /* SPECIAL: this flag is the opposite of DESIGN_FLAG_PRESERVE, used only for the 'About' and 'Using' notes + the icon bitmap in the icon note */ #define DESIGN_FLAG_PROPAGATE_NOCHANGE 'r' /* DESIGN: this flag is used to propagate the prohibition of design change */ #define DESIGN_FLAG_V4BACKGROUND_MACRO 'S' /* FILTER: This is a V4 background agent */ #define DESIGN_FLAG_SCRIPTLIB 's' /* FILTER: A database global script library note */ #define DESIGN_FLAG_VIEW_CATEGORIZED 'T' /* VIEW: Indicates a view that is categorized on the categories field */ #define DESIGN_FLAG_DATABASESCRIPT 't' /* FILTER: A database script note */ #define DESIGN_FLAG_SUBFORM 'U' /* FORM: Indicates that a form is a subform.*/ #define DESIGN_FLAG_AGENT_RUNASWEBUSER 'u' /* FILTER: Indicates agent should run as effective user on web */ #define DESIGN_FLAG_AGENT_RUNASINVOKER 'u' /* FILTER: Indicates agent should run as invoker (generalize the web user notion, reuse the flag */ #define DESIGN_FLAG_PRIVATE_IN_DB 'V' /* ALL: This is a private element stored in the database */ #define DESIGN_FLAG_IMAGE_WELL 'v' /* FORM: Used with 'i' to indicate the image is an image well. Used for images with images across, not images down. 'v' looks like a bucket */ #define DESIGN_FLAG_WEBPAGE 'W' /* FORM: Note is a WEBPAGE */ #define DESIGN_FLAG_HIDE_FROM_WEB 'w' /* ALL: notes stamped with this flag will be hidden from WEB clients */ /* WARNING: A formula that build Design Collecion relies on the fact that Agent Data's $Flags is the only Desing Collection element whose $Flags="X" */ #define DESIGN_FLAG_V4AGENT_DATA 'X' /* FILTER: This is a V4 agent data note */ #define DESIGN_FLAG_SUBFORM_NORENDER 'x' /* SUBFORM: indicates whether we should render a subform in the parent form */ #define DESIGN_FLAG_NO_MENU 'Y' /* ALL: Indicates that folder/view/etc. should be hidden from menu. */ #define DESIGN_FLAG_SACTIONS 'y' /* Shared actions note */ #define DESIGN_FLAG_MULTILINGUAL_PRESERVE_HIDDEN 'Z' /* ALL: Used to indicate design element was hidden */ /* before the 'Notes Global Designer' modified it. */ /* (used with the "!" flag) */ #define DESIGN_FLAG_SERVLET 'z' /* FILTER: this is a servlet, not an agent! */ #define DESIGN_FLAG_ACCESSVIEW 'z' /* FORM: reuse obsoleted servlet flag */ #define DESIGN_FLAG_FRAMESET '#' /* FORM: Indicates that this is a frameset note */ #define DESIGN_FLAG_MULTILINGUAL_ELEMENT '!'/* ALL: Indicates this design element supports the */ /* 'Notes Global Designer' multilingual addin */ #define DESIGN_FLAG_JAVA_RESOURCE '@' /* FORM: Note is a shared Java resource */ #define DESIGN_FLAG_STYLESHEET_RESOURCE '=' /* Style Sheet Resource (SSR) */ #define DESIGN_FLAG_WEBSERVICE '{' /* FILTER: web service design element */ #define DESIGN_FLAG_SHARED_COL '^' /* VIEW: shared column design element */ #define DESIGN_FLAG_HIDE_FROM_MOBILE '1' /* hide this element from mobile clients */ #define DESIGN_FLAG_HIDE_FROM_PORTAL '2' /* hide from portal */ #define DESIGN_FLAG_HIDE_FROM_V3 '3' /* ALL: notes stamped with this flag will be hidden from V3 client */ #define DESIGN_FLAG_HIDE_FROM_V4 '4' /* ALL: notes stamped with this flag will be hidden from V4 client */ #define DESIGN_FLAG_HIDE_FROM_V5 '5' /* FILTER: 'Q5'= hide from V4.5 search list */ /* ALL OTHER: notes stamped with this flag will be hidden from V5 client */ #define DESIGN_FLAG_HIDE_FROM_V6 '6' /* ALL: notes stamped with this flag will be hidden from V6 client */ #define DESIGN_FLAG_HIDE_FROM_V7 '7' /* ALL: notes stamped with this flag will be hidden from V7 client */ #define DESIGN_FLAG_HIDE_FROM_V8 '8' /* ALL: notes stamped with this flag will be hidden from V8 client */ #define DESIGN_FLAG_HIDE_FROM_V9 '9' /* ALL: notes stamped with this flag will be hidden from V9 client */ #define DESIGN_FLAG_MUTILINGUAL_HIDE '0' /* ALL: notes stamped with this flag will be hidden from the client usage is for different language versions of the design list to be hidden completely */ #define DESIGN_FLAG_WEBHYBRIDDB '%' /* shimmer design docs */ #define DESIGN_FLAG_READONLY '&' /* for files, at least for starters */ #define DESIGN_FLAG_NEEDSREFRESH '$' /* for files, at least for now */ #define DESIGN_FLAG_HTMLFILE '>' /* this design element is an html file */ #define DESIGN_FLAG_JSP '<' // this design element is a jsp #define DESIGN_FLAG_QUERYVIEW '<' // VIEW - Query View in design list #define DESIGN_FLAG_DIRECTORY '/' /* this file element is a directory */ #define DESIGN_FLAG_PRINTFORM '?' /* FORM - used for printing. */ #define DESIGN_FLAG_HIDEFROMDESIGNLIST '~' /* keep this thing out of a design list */ #define DESIGN_FLAG_HIDEONLYFROMDESIGNLIST '}' /* keep this thing out of a design list but allow users to view doc using it */ ********************* End Design Flags info ************************ ********************* getElementType function ************************ Function getElementType(eldoc As NotesDocument) As String Dim flags As String, etype As String flags = eldoc.GetItemValue("$FLAGS")(0) ' from the design element If Instr(1, flags, "sj", 0) > 0 Then getElementType = "SCRIPT LIBRARY - JAVA" : Exit Function If Instr(1, flags, "s", 0) > 0 Then getElementType = "SCRIPT LIBRARY - LS" : Exit Function If Instr(1, flags, "h", 0) > 0 Then getElementType = "SCRIPT LIBRARY - JS" : Exit Function If Instr(1, flags, "t", 0) > 0 Then getElementType = "DATABASE SCRIPT" : Exit Function If Instr(1, flags, "m", 0) > 0 Then getElementType = "OUTLINE" : Exit Function If Instr(1, flags, "k", 0) > 0 Then getElementType = "DATA CONNECTION RESOURCE" : Exit Function If Instr(1, flags, "U", 0) > 0 Then getElementType = "SUBFORM" : Exit Function If Instr(1, flags, "#", 0) > 0 Then getElementType = "FRAMESET" : Exit Function If Instr(1, flags, "i", 0) > 0 Then getElementType = "IMAGE RESOURCE" : Exit Function If Instr(1, flags, "W", 0) > 0 Then getElementType = "PAGE" : Exit Function If Instr(1, flags, "@", 0) > 0 Then getElementType = "APPLET" : Exit Function If Instr(1, flags, "=", 0) > 0 Then getElementType = "SHARED STYLE SHEET" : Exit Function If Instr(1, flags, "{", 0) > 0 Then getElementType = "WEB SERVICE" : Exit Function If Instr(1, flags, "^", 0) > 0 Then getElementType = "SHARED COLUMN" : Exit Function If Instr(1, flags, "g", 0) > 0 Then getElementType = "SHARED FILE" : Exit Function If Instr(1, flags, "y", 0) > 0 Then getElementType = "SHARED ACTIONS" : Exit Function If Instr(1, flags, "F", 0) > 0 Then getElementType = "FOLDER" : Exit Function If Instr(1, flags, "G", 0) > 0 Then getElementType = "NAVIGATOR" : Exit Function If Instr(1, flags, "Y", 0) > 0 Then etype = "VIEW" If Instr(1, flags, "d", 0) > 0 Then etype = "VIEW" If Instr(1, flags, "T", 0) > 0 Then etype = "VIEW" If Instr(1, flags, "c", 0) > 0 Then etype = "VIEW - CALENDAR" If Instr(1, flags, "o", 0) > 0 Then etype = "VIEW - SPOFU DESKTOP STORED" If Instr(1, flags, "f", 0) > 0 Then etype = "AGENT" If Instr(1, flags, "J", 0) > 0 Then etype = etype & " - JAVA" Elseif Instr(1, flags, "L", 0) > 0 Then etype = etype & " - LS" Else etype = etype & " - FORMULA" End If If Instr(1, flags, "S", 0) > 0 Then etype = etype & " - SCHEDULED" If Instr(1, flags, "u", 0) > 0 Then etype = etype & " - RUN AS USER" End If If Instr(1, flags, "C", 0) > 0 Then etype = "FORM" If Instr(1, flags, "D", 0) > 0 Then etype = "FORM" If Instr(1, flags, "V", 0) > 0 Then etype = " - PRIVATE" If etype = "" Then If eldoc.HasItem("$FIELDS") Then getElementType = "FORM" : Exit Function If eldoc.HasItem("$$FORMSCRIPT") Then getElementType = "FORM" : Exit Function If eldoc.HasItem("$VIEWFORMAT") Then getElementType = "VIEW" : Exit Function etype = "*UNKNOWN*" etype = etype & " (flags: " & flags & ")" End If getElementType = etype End Function