Link to home
Start Free TrialLog in
Avatar of BillTr
BillTr

asked on

Embedded view vs private view.... What's the best approach for filtering a view?

Hi,
I trying to design a Notes 7 database that will store activity for a given set of accounts. The accounts have
separate managers and I need the view to filter the account activity so that managers only see the detail for
those accounts that they are assigned to. I considered doing this via a private query, but I haven't used embedded views before and it looks like I could get the same result via that. I've been toying with it but I'm struggling a bit. The base view lists all accounts with the first column being categorized by account name and the next 3 being account activity. I took this and added to a form as an embedded view, then added code to the show single categories (Account = "name of the account"). When I try to create the form it
failed telling me that the Category must be a single string.

Could give me some insight as to what that's telling me? Also, I'm concerned that I'm off on this approach too. Is there a better way to filter, or leverage security,  on a view? For a row, not a column?

Sorry to be so long-winded.
ASKER CERTIFIED SOLUTION
Avatar of SysExpert
SysExpert
Flag of Israel image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of BillTr
BillTr

ASKER

Thanks for getting back!
Here is an example of what I'm trying to get into the view.
Base View:
Account                    Activity Date                     Activity                
Acct A                          4/2/2007                         +100
Acct B                           4/2/2007                         +250

Embedded                                                                              
Manger Smith is assigned to Acct A. So he should see
Acct A                          4/2/2007                          +100

The form on which these values exist is called summary1.

I built the base view by just selecting summary1. The field on the form that has the manager name is called test1. Then I inserted that view into a brand new form called "embedded summary" and changed the Show Single Category with the following: (@Name( [CN] ; @UserName) = @Name([CN];test1))
I added my name to summary1.test1 and I thought from there I could create a doc with the new form and see data in the for my name. So far I have not been successful gettting any result.

I up'ed the points on this.
Avatar of BillTr

ASKER

When in designer, I look at the embedded view on the form I can see the base view displayed. So, I suspect my problem is on the syntax for the single category. The first column in the base view is the user name (test1). I have tried several variations on this, but I either get a blank on the embedded view or I get the single string message.

Avatar of BillTr

ASKER

I didn't realize that the read field can filter selected rows. Thanks for the fast response