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.

Using a script to open files and limit access

Featured Replies

  • Newbies

Okay, here's what I want to do:

I have a FMP Server running a TON of databases, some are related, most are not.

I want to create a login database (edulogin) with two fields: login and password.

Then, a second database (edupermissions) with fields: login, database, and permission.

edupermissions will relate to edulogin using the field "login". Therefore, for each database that a user has access to, there will be a record in the edupermissions database, including a level of security located in the "permission" field. (everybody got this so far?)

Basically, edulogin will be related to edupermissions with a "one to many" relationship, using "login" as the relationship field.

SO, a user opens edulogin, it brings them to a screen that forces them to enter a login and password. A successful login will bring them to a screen with a portal displaying all the related records in the database edupermissions showing them which databases they have access to, and a button for each to open that database. With a press of the button, the system will then open that database with the password listed in the "permission" field.

With that in mind, this is what I'm having problems with:

How do I script it so that FMP will open a file from the current server and the file will be named in the field "database".

Kinda like:

Open [Open hidden, "<<database>>"]

The other thing I can't seem to figure out is how to specify the password to give to that file when it is opened (transparently to the user) by pulling it from the field "permission".

I would like to avoid having to add an If/Then statement in a script every time I add a new database to the server. However, if that's what I have to do, that's what I have to do. As far as the password thing, I'm completely at a loss.

If I have been unclear on anything, please post and I'll do the best I can at explaining the situation.

Thank you in advance!

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.