Dear Andre Guirard, turning off @SetViewInfo doesn't work

You’ve posted here …https://www-10.lotus.com/ldd/nd6forum.nsf/55c38d716d632d9b8525689b005ba1c0/ad8dfa7e797a91fa8525702a00759bbd?OpenDocument

… and said at Lotusphere that using …

@SetTargetFrame(“[framename]”);

@UpdateFormulaContext;

@SetViewInfo([SetViewFilter]; “”; “[columnname]”; 1)

… in the QueryClose event would clear the view filtering set for that view.

There have been many reports here that the clearing method doesn’t work. I’ll add mine to those reports.

Here are my details:

Frameset - two frames: page with embedded outline in left, and view displaying in right.

Outline entries - computed actions:

@SetTargetFrame(“[framename]”);

@Command([OpenView]; “[viewname]”);

@SetViewInfo([SetViewFilter]; @UserName; “[columnname]”; 1);

views - QueryClose events: the three commands higher up in this post. Several different variations of the last statement tried:

@SetViewInfo([SetViewFilter]; temp; 0; 1)

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

@SetViewInfo([SetViewFilter]; temp; “”; 1)

Results - Error: “Cannot execute the specified command” clicking another outline entry.

I have used a workaround that involves putting "@SetViewInfo([SetViewFilter]; temp; “”; 1) into the PostOpen event of every other non-filtered view in the database. And that generally works, except that when users first open the database, they get the “Cannot execute the specified command” error message. They do not get it again after that moment.

Please tell us how we can reliably undo filtering in an outline/frameset environment.

Thanks,

Bill Lucas

Subject: RE: Dear Andre Guirard, turning off @SetViewInfo doesn’t work

The formula I posted, always works for me when there are frames. Of course you need to specify the correct frame name that contains your view, in place of [framename], just as I assume you did in your outline entry.

In all three of your sample last lines, you haven’t provided a valid column name, and that might be the cause of your problem. I would’ve expected a different error message in that case, but try using the same column name that you used to turn filtering on. The only difference between the “turn on filtering” outline action formula and the “turn off filtering” Queryclose formula, should be to change @Username to “”.

Please let us know how it turns out. Thanks.

Subject: RE: Dear Andre Guirard, turning off @SetViewInfo doesn’t work

Andre, I also attended that session and recall the question and your response. You said it didn’t matter what the column name was but if I recall correctly you did not say it had to be a valid column name. :stuck_out_tongue: Of course, he should have tried it with a column name, but I can understand his confusion. It’s a subtle but important distinction.

Subject: Turning off @SetViewInfo still doesn’t work

I apologize for the late response.

Yes, the frame name was correct. And yes, I had specified the column name in the @SetViewInfo statement in some of my tests. Those also resulted in the “Cannot execute the specified command” error. I just retried that and got the same result.

I don’t know what the problem is, but I have a hunch that in a frameset environment we cannot confidently assume that the first two lines actually do bring context back to the target frame, or that even if context is brought back to the frame, it isn’t there long enough for the third statement to execute successfully. That scenario would likely vary among dot releases of the client.

(Just guessing here.)

It’s not just me, either. Chris Ivey posted twice in January 2006 about the same issue.

Subject: RE: Turning off @SetViewInfo still doesn’t work

Let’s consider the evidence we have…

There’s not a bug report on this issue, neither referencing @SetViewInfo nor @UpdateFormulaContext, so whatever it is, is not a known problem.

I’m not certain I’ve ever tried this in 6.5.1, but I also haven’t gotten anyone writing me back from the article I published in The View complaining that this part of the sample application didn’t work. I think at least a dozen people would have tried the application, probably using a variety of versions, so there’s a pretty good chance that they’d have found the problem if that application exhibited it. I haven’t found that people are shy about letting me know if they encounter a problem.

This makes me think that, while the version may be implicated, there may also be something about the application. Have you tried the sample application from the View article, and does it work on your client? If one works and the other doesn’t, we can look for any differences in the applications that we might currently be thinking are unimportant, but might have an effect. Is it on a server, does it open a messagebox like the sample application does, are there any documents in the filter category, etc?

Note: I’m aware that the view in the sample database works differently the first time you open it – a different issue – and there’s an SPR for it. But it seems to work okay on subsequent uses of the view.

If you can send me a small sample application that demonstrates the problem behavior, I would be interested to test it out in different versions of Notes. Since I can debug the Notes source, doing so might help me come up with a workaround.

Subject: RE: Turning off @SetViewInfo still doesn’t work

You got it. One brand new, malfunctioning db ready to go. One form, one doc, one frameset with two frames, one page with embedded outline, three views (one with QueryClose event consisting of the three recommended commands). Click the outline entry for that view and it opens filtered. Click another outline entry and “Cannot execute the specified command”.

Where do I send this 384kb db?

Thanks

Subject: RE: Turning off @SetViewInfo still doesn’t work

Me. andre underscore guirard at us.ibm.com

Subject: Solution: Turning off @SetViewInfo still doesn’t work

Apparently it mattered that I was using @Prompt in my example; doing so must have been resetting the active focus when the prompt dialog closed.

I managed to get your sample database working by changing the Queryclose to the following:

@SetTargetFrame(“NotesView”);

@UpdateFormulaContext;

@Command([OpenView]; @Subset(@ViewTitle; -1));

@SetViewInfo([SetViewFilter]; “”; “Personcolumn2”; 1)

Subject: RE: Solution: Turning off @SetViewInfo still doesn’t work

Great reference for clearing @SetViewInfo in the View Queryclose

Subject: Excellent! Solution: Turning off @SetViewInfo still doesn’t work

Thank you very much, Andre.

It works on my much larger db also.

Subject: RE: Solution: Turning off @SetViewInfo still doesn’t work

Excellent find. This should be added into the notes help as an example