August 18, 200322 yr Hi, I have been requested to lock down a portal in a layout so that only a small group of people can modify the fields in the portal, all other users should have read only access. I would like to know the best way to do this. Ideally, I do not want additional layouts just for certain groups, and neither do I want a password input box unless completely necessary. Any Ideas? Thanks, Joseppic.
August 18, 200322 yr Hello Joseppic, You can do this via field validation; a rough -hardcoded- example would have the following calculation in the field validation: Case ((Status(CurrentUser) = "User1") or (Status(CurrentUser) = "User2"), 1 ) Where User1 and User2 are the names of users that ARE allowed to change the fields in the portal. If you do it this way, Filemaker will use the username specified for the machine, or in Filemaker's prefs. Hope this helps, Ernst.
August 18, 200322 yr You could also create two versions of the same layout. One where the fields can be edited, and one where they can't. Then, set the access privileges for these layouts accordingly, and possibly have a navigation script to go to the appropriate layout according to the access privileges.
August 19, 200322 yr I've been experimenting trying to do the same thing. I went with creating two layouts, but am having trouble creating a script that will take the user to the correct layout based on their logon password. Does anyone have an example of a script that will do this?
August 19, 200322 yr Problem with this, is that there is no Status(CurrentPassword) function. A way around this is to assign passwords to different groups and use Status(CurrentGroup) in stead. Script will be something like: If Status(CurrentGroup) = Group One goto layout (Group One layout) else If Status(CurrentGroup) = Group Two goto layout (Group Two layout) End if End if Hope this helps, Ernst.
August 19, 200322 yr You would think that would work, but for some reason it's not. I always go to the "Group 1" layout no matter how I'm logged in. Is there something missing in the script?
August 19, 200322 yr You have to be careful how you check the group. Status(CurrentGroups) will return a list of all the groups (separated by a linebreak) to which the current user belongs. The full access password automatically belongs to all groups. So, you need to use either the position() or patterncount() function to find a particular group. Use: PatternCount(Status(CurrentGroup),"developer")>0 instead of: Status(CurrentGroup)="developer"
August 21, 200322 yr This also explains why it is plural, Status(CurrentGroup[color:"red"]s) Thanks Bob!
August 25, 200322 yr Ernst, I downloaded the sample file you supplied. I had my quotes in the wrong place. the script works fine now, thanks!
August 25, 200322 yr You're welcome, but remember to change it like Bob suggested in his post! Regards, Ernst.
Create an account or sign in to comment