Creating a dynamic view

I’ve already posted my problem, I’ve tried several approaches, but nothing worked so far. I would appreciate every kind of hint 

What I’d like to have:

I have 2 forms (F1 and F2)

F2 contains kind of project information and in a list field several locations.

F1 contains a username and in a list field several locations the user is responsible for.

I’d like to have a view that shows F2-forms. Every user should see only the documents that include the location of his F1-form.

What I’ve tried so far:

I’ve tried to use dblookup together with the SELECT statement.

I’ve tried to use environment settings together with the SELECT statement.

Both did not work.

I tried to manipulate the selection formula by script, but I could not really handle that – sometimes the script changed the selection formulas of other views, sometimes the selection formula stayed active with the settings of the previous user.

Then I added a field to F2 form that contains all Users with permission for the location and I tried the SELECT statement with @ismember(listfield,@Username)

That worked better, but it behaved strange, the view showed document that donot contain the user name in the list field?

In my previous thread was an answer that suggested to use embedded views. I’m not firm with this kind of view, so if that is the solution, I’d appreciate a step by step approach for dummies.

I hope that I could express my wishes and I’ waiting for useful advices,

Thanks stephan

Subject: Creating a dynamic view

If you look at the help, or search this forum you’ll see that @dblookups, Environment and @username functions do not work in selection formulas.

The embedded view is the way to go, I haven’t read the previous post so maybe this will be different/easier to read.

The idea of having the field on F2 containing all users with the correct permission is right.

Then create a view of F2 documents, with first column categorised by this field. Put this view embedded on the user form (F1), with single category setting of the username. Only the relevant documents will be shown.

Bear in mind that if you update the locations on F1 this won’t immediately change the view, as you have to have some way of updating the F2 documents with the correct users

hth

Dan

Subject: RE: Creating a dynamic view

Hi Dan,

thank you for the information. I’ve tested it out and it worked fine for me.

But there is a last question:

I’ve created this view with F2 documents (View2) and have embedded it into a form and in the form it shows only (@Username) the appropriate documents.

But I still have this view View2, where all documents are included. How can I “hide” this view from users? So that it is only accessible via the form with the embedded view?

Subject: RE: Creating a dynamic view

If this is a security, rather than a convenience, issue, then don’t rely on views to do the work. Remember, any Notes client user can create a private view. If users are not allowed to see other documents at all, then Readers-type fields are the proper solution.