Tip for @SetViewInfo

I was having the worst time trying to get @SetViewInfo to work. I even copied the example straight from the Notes help document (and the Notes and Domino 6 Programming Bible) but couldn’t get it to work.

No documents would show up in the view.

I figured out that you need to uncheck “Collapse All when database is opened” for that view. Then it worked perfectly.

Subject: Tip for @SetViewInfo

Here’s how I avoid the problem:

@Command([ViewExpandAll]);

list := “”:@DbColumn(“”; @DbName; @ViewTitle; 1);

choice := @Prompt([OkCancelList]; “View by Person”; “Select the person you want to see”; “”; list);

@SetViewInfo([SetViewFilter];choice;“RequesterName”; 1);

@Command([ViewCollapseAll])

Subject: *Thanks! That does explain why a couple of my views worked and not the others.

Subject: Thanks - that helped me with an embedded view problem

I was getting the error “cannot execute the specified command” when switching between embedded views on a form, and couldn’t figure out why. Then I saw your post, and checked, and the underlying views were using the “Collapse all when database is opened” option. They were also using @Command([ViewCollapseAll]) in the PostOpen event. Removing those did the trick.