Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Simple example of limiting access to a portal

Featured Replies

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.

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.

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.

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?

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.

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?

Well, I made a small testfile to check and it

GroupTest.fp5.zip

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"

This also explains why it is plural, Status(CurrentGroup[color:"red"]s)

Thanks Bob!

Ernst, I downloaded the sample file you supplied. I had my quotes in the wrong place. the script works fine now, thanks!

You're welcome, but remember to change it like Bob suggested in his post!

Regards,

Ernst.

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.