Need Help (View)

hi…wanna ask if possible to specify the view formula while using “Openview” function?

eg (prompt => pls select the country you wish to view?

user input “USA” and upon using the Openview function, at the same time specify the selection condition based on “Country = ‘USA’”.

hope my qns is clear enough. thanks

Subject: Need Help (View)

In short, you can’t.

In theory, you sort of could by calling an agent that would modify the views selection formula, rebuild the view index and then open the view. You will not want to do that. It would be dog slow and put enormous stress on the server. Views are the result of a predefined select statement and as such not meant to be (ab)used as queries to relational databases.

You could still use a fulltext search, but most probably, there’s a much easier approach. If all you want to do is filter an existing view according to a single parameter, you can use singe-category views. Depending on if your application is for the web or the client (I assume web, because you mentioned OpenView), there are a couple of alternatives to implement this, but the result is always the same: Only those documents are shown, that can be found under one specified category, while the category itself is not shown.

For Notes and web use, you can embed a view into a form. The embedded view has an event where you can put a formula to determine which category to display. This can e.g. be the value of a combobox field.

For Notes, you can alternatively use @SetViewInfo.

For web, you can alternatively build a link, that contains &RestrictTo=Your%20Category%20Goes%20Here. As an example, see this link:

http://www-10.lotus.com/ldd/nd6forum.nsf/AuthorAllThreadedweb?OpenView&RestrictToCategory=Clara%20C