$Flags fältet i Lotus Notes

Här är en sida som beskriver vad varje bokstav och varje bokstavskombination i $Flags fältet betyder.
Mycket användbart..
Finns även en funktion för att kolla designelement utifrån $Flags men den har några brister.
Bifogar en förbättrad variant nedan.

Allt du vill veta om $Flags fältet


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, "OQ", 0) > 0 Then getElementType = "SEARCH QUERY" : Exit Function
 If flags = "X" Then getElementType = "V4 agent data note" : 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 = 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
  If eldoc.HasItem("IconBitmap") Then getElementType = "DATABASE ICON" : Exit Function
  etype = "*UNKNOWN*"
  etype = etype & " (flags: " & flags & ")"
 End If
 getElementType = etype
End Function

Kommentarer

Kommentera inlägget här:

Namn:
Kom ihåg mig?

E-postadress: (publiceras ej)

URL/Bloggadress:

Kommentar:

Trackback
RSS 2.0