Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1839
  • Last Modified:

Hidden view in Lotus notes NSF

How to programetically identify that the view in the collection of :
dominoDatabase.Views
is a hidden view?

Is there any specific property of view which will tell us that this is a system view.

I show "IsPrivate" but nothing like "IsSystem" or "Ishidden"

Thank you in advance.
Hitesh
0
z1nzuwad1a
Asked:
z1nzuwad1a
  • 5
  • 4
  • 4
  • +1
2 Solutions
 
daj_ukCommented:
Views can only be hidden when the name is enclosed in (  )

There is no property to hide a view

So i guess if you check the view name, and it starts with a "(" then you know it is hidden
0
 
z1nzuwad1aAuthor Commented:
The All Documents come as ($All), and still is not hidden, is there any exceptions to the rule of "*()"?
0
 
daj_ukCommented:
Is the ($all) an Alias?
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
z1nzuwad1aAuthor Commented:
I use followuing code (vb.net) :

 For Each dView As Domino.NotesView In dDatabase.Views
           dViewName = dView.Name
 Next
where I get one of the view name as: ($all)  and I belive it represents "All Documents" view which is not hidden.
0
 
Sjef BosmanGroupware ConsultantCommented:
In general, views enclosed in parentheses are hidden, except for the special view that start with "($", like ($All) and ($Inbox), the latter not being a view but a folder. These special view have each their proper icon in the menu at the left in the Notes client.
0
 
Steve KnightIT ConsultancyCommented:
Agreed with all of the above.  If you want to check if a view is hidden then it's name will start with (.  As to what shows in the navigator depends what gets put in the outline/navigator by the developer/Lotus - I generally hide all views in my applications to save occasional prying eyes but obviously link to them from outlines/navigators etc.

If it shows in the view | goto menu then it is not-hidden, if it shows when you do Control Shift and view | goto menu then it was hidden.  To programmatically check just see if the name starts with (, i.e. in LotusScript

if left(view.name,1)="(" then msgbox "View is hidden"

Dim session As New notessession
Set db=session.currentdatabase

Forall v In db.views
  If Left(v.name,1)="(" Then Print v.name & " is hidden"
End Forall

Steve
0
 
z1nzuwad1aAuthor Commented:
So to conclude, is it safe to assume folloing?

I think following condition is not enough:
  If Left(v.name,1)="(" Then Print v.name & " is hidden"

as we all know ($All) and ($Inbox) are not hidden views but special folders so the condition should be:
 
If Left(v.name,1)="(" and Left(v.name,2)<>"($" Then
       Print v.name & " is hidden"
  end if


0
 
Sjef BosmanGroupware ConsultantCommented:
Seems correct to me.
0
 
Steve KnightIT ConsultancyCommented:
Not as such.. but it depends why you want to know why they are hiden. They ARE hidden views too.  They just so happen to be shown by an application to users (in this case mail database) - others may include the trash view, rules etc. etc.

Steve
0
 
Sjef BosmanGroupware ConsultantCommented:
AFAIK, if you create a view with the name ($All), it will always show up in the standard outline....
0
 
z1nzuwad1aAuthor Commented:
I need to know because I need t ofind out the list of folder/views this document exists (in reality, is visible to users) , if I include the hidden views, it will also list all VIM... and all other hidden views, and my client will ask where these are coming from, in short it is my business requirement.

Thank you.
0
 
Steve KnightIT ConsultancyCommented:
Fair enough!
0
 
Sjef BosmanGroupware ConsultantCommented:
I hope you know that a folder's structure is much like a view, but its handling of documents is totally different?
0
 
z1nzuwad1aAuthor Commented:
How the handling of documents is different in folders than views.

Also,

More troubling thing I found is: not just ($All) and ($Inbox)  starts with "($", but POP, all VIM and almost all system folders starts with "($" , spo what I concluded earlier as:

If Left(v.name,1)="(" and Left(v.name,2)<>"($" Then
       Print v.name & " is hidden"
  end if
is wrong,

Any thoughts?
0
 
Steve KnightIT ConsultancyCommented:
Well... if you don't want anything except user folders you can check if it is a folder or view by using a view.isfolder check I suppose and exclude anything not a folder.

If we are talking a mail db template here then it will always be in the All documents VIEW, it may or not be in the inbox view etc. but that is based on known field flags making it NOT be in the view (check the view selection forumla for inbox view) etc.

0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 5
  • 4
  • 4
  • +1
Tackle projects and never again get stuck behind a technical roadblock.
Join Now