I see that a lot of people use the lookups for lists to choose from, mainly I’m talking about within the same db here. In my case I see the form and view that relates to these @dblookup. So does the amin have to go into designer each time to add to the list to choose from? Is that the preferred method over just adding it to a dialog list? Maybe I’m missing it where this show up just in the notes client where the list can be edited. I’m trying to see the benefit of creating an extra form and view when you can just type it in?
Ok, the other question is sorta relates to above. I see an @dblookup in my form so certain users can edit a section. Actually there are two fields on the form, then inside those fields, are @dblookups that shows special users. On the access section of the form, those two fields are there. Question… why didn’t the person just make a role and add the role to the list? I tried adding a role but it keeps messing up. I just typed “[roletype]” and it kept giving me an error message.
If anyone can fill my questons, would be nice…thanks…
Subject: general question about lookups
Loyd,
this is a method that I used to use in versions of Notes prior to R5, where you didn’t have the option to ‘enforce consistent ACL’. If your ‘special user’ wanted to work on a local replica with the same privileges thay have on the server copy, this was the best way to ensure they could do so.
What error are you getting when trying to use a role?
hth
Tony
Subject: RE: general question about lookups
The message comes up and just says incompatible data types and the form will not launch.
Subject: RE: general question about lookups
Loyd,
if you want to use a role to restrict edit access to a section, then the kind of formula you need is like this:
@IsMember(“[Manager]”;@UserRoles)
This will return true if the current user has the [Manager] role, and will allow editing of the controlled-access section by that user.
hth
Tony
Subject: RE: general question about lookups
Thanks!!
Subject: RE: general question about lookups
I keep getting an Incompatible data type when trying to launch the form with the formula in the controlled access area.
I creatd the role TKReview and added it to the acl and gave 3 users the role.
I put this in the access formula of the controlled section:
@IsMember(“[TKReview]”;@UserRoles)
What is the type suppose to be?
Edible, Computed, Computed when composed, or Computed for Display.
Subject: RE: general question about lookups
Hi Loyd
Don’t know if you are still checking this thread, but i just got back to it after a long break. I only get to check this forum every now and then.
With your roles, the controlled access section doesn’t seem to like formula. I tried the @if( @ismember(…)…) sort of formula but it doesn’t control editing of the section. I found that using a simple list works e.g. “[TKreview]”:“Andrew Gillan”
My original code for roles was more for using hidewhens as they would result in a True / False outcome. Same with using the @ismember( “[TKreview]”; @userroles ) would also result in a true/false answer. The controlled sections just need the list of the roles / names of users able to edit that part of the document.
I would have thought that a formula that results in a list of roles or names would work, but i haven’t been able to get it to work. e.g. @if( @ismember( “[TKreview]”;@useroles) ; @username; “” ).
Sorry for not checking back to my posts earlier.
hth
andy G
Subject: general question about lookups
Hi Loyd
Jerry answered the first part nicely, but if i could add that if your organisation runs a very tight change control process, a simple thing such as adding an entry for a dialog list would involve the complete change control cycle. i.e. document the change, plan the change, test the change, get UAT completed, roll out the change, resign the database and so on… man … that’s too much work just to add a simple value in a dialog list.
With your second issue, i don’t know why roles were not initially used. YOu’d have to speak with the database creator as to why he/she used that particular logic. To help you out with roles, for hide-whens , try something like
@IsNotMember( “[sectionEditor]”; @UserRoles )
or
@IsMember( “[sectionEditor]”; @UserRoles )
or
@contains( @UserRoles; “[sectionEditor]” )
or if you are using the role in an author field, ensure you set the values as a list
e.g.
“Jo Bloggs”:“[sectionEditor]”:“NotesAdmin”
HTH
andyG
Subject: RE: general question about lookups
For some reason when tyring one of your formulas, I’m getting incompatible data types when trying to launch the form. What is the problem?
Subject: general question about lookups
Thanks for the help! I’m working on my first db!
Subject: general question about lookups
Loyd, I can answer your first question.
Usually when you have a field that depends on a list of values, rather than hardcoding the list in the field definition, it is better to create a form and view that allows the users, usually users that are administrators of the database, to be able to manage the values for that list creating or deleting documents where the documents contain the values to be used in the list.
This way, if a new value is needed, or an existing value is no longer needed, the administrator can just handle it; no need for a design change.
The field can just do a @DBLookup or @DBColumn to the view and retrieve the current list of values for that field. Lookup views usually just contain one column and should be a hidden view, as it should never change in design. If you use a normal, user-visible view, and the design is changed, then that could affect your lookup.