Subject: How to hide view from Web+Mobile using script
Some very basic testing in Designer shows that:1) A view hidden from web browsers have a ‘w’ in the $Flags item
- A view hidden from mobile clients have a ‘1’ in the $Flags item
In LotusScript, all you should need to do is:
Dim docDesign As NotesDocument
Dim strFlags As String
'-- Get a reference to docDesign (= the view)
'-- Get the $Flags item.
strFlags = docDesign.GetItemValue(“$Flags”)(0)
'-- To add the ‘Hide from web browsers’ flag.
If Instr(1, strFlags, “w”) = 0 Then strFlags = strFlags & “w”
'-- To add the ‘Hide from Mobile Clients’ flag.
If Instr(1, strFlags, “1”) = 0 Then strFlags = strFlags & “1”
'-- To remove the ‘Hide from web browsers’ flag:
strFlags = Replace(strFlags, “w”, “”)
'-- To remove the ‘Hide from Mobile Client’ flag:
strFlags = Replace(strFlags, “1”, “”)
'-- Update the design element (= the view)
Call docDesign.ReplaceItemValue(“$Flags”, strFlags)
Call docDesign.Save(False, False)
Hope this helps
Ken Haggman, http://www.noteshound.com