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.

Managing Accounts Via Script

Featured Replies

Hi all.

I was wondering if there is anyway to get information about existing accounts via script or calculation.

I am currently working on an employee table for our database. I will be giving Administrators the ability to create, delete, activate and deactivate accounts. So for instance, on an employee layout I would like to be able to show if an account exists matching the employee name, what privelege set it belongs to and if an account is active or not. It would also be nice to be able to show a list of existing accounts.

Is it possible to pull this kind of information from accounts?

Thanks for any help :P

Edited by Guest
The Topic: <a href="http://fmforums.com/forum/showtopic.php?tid/217681">Managing Accounts Via Script</a> was moved from <a href="http://fmforums.com/forum/showforum.php?fid/36">Managing Scripts</a> to <a href="http://fmforums.com/forum/showforum.php?fid/

One way to go about this is to store the Account Name, Priv Set Assigned and Status (Enabled/Disabled) in the Employee record. Script everything (Account Creation/Deletion/Enable/Pwd Change). Creating an Account, creates an Employee Record.

  • Author

I already have a table with many employee records. We are about to allow access to the database to different departments. But not every employee will be accessing the database. So I only want accounts for certain ones. I have scripted a button to create the accounts from the employee record. What I was hoping for was to be able to give an indication of wether the employee already has an account created or still needs one created.

In our system, we have employees with accounts that are disabled. You don't need to check, everyone has an account.

Edit: Here's a pdf of my Create Account script. This works from a layout that is based on the People table and is in a popup window paused. Priv sets are selected from a hard-coded value list popup menu. There's no "getting" priv sets from Security.

Notice you can Enable an Account to "ping" and see if it's there. Error 213 is used.

AccountP1.pdf

AccountP2.pdf

Edited by Guest

  • Author

Thanks Barbara. I appreciate the guidance. However, I don't see the Pdf...

While I have your attention. I am also just beginning to set up custom menus but I can't seem to figure out how to assign a custom menu to a privelege set. How is this done?

Oh there they are! Thanks..

Edited by Guest

  • Author

The script is very helpful. I believe I can put it all together now.

Thanks again

Sorry for the appearing, then disappearing PDFs. I wanted to remove the filename (Client Info).

I can't seem to figure out how to assign a custom menu to a privelege set. How is this done?

Custom menus can be assigned to layouts, or they can be set to be the file default. The only way to assign a custom menu set by privilege set would be to make a script that sets the file's default custom menu based on the current user's privilege set. Then set the layouts to use the file default.

You are making your life entirely too complicated. Take a look at External Server Authentication for your Accounts. That way, you make them once, and they work in all properly configured files. No need for scripts and error checking and rollbacks, etc.

Steven

  • Author

Thanks Vaughan, that helps clear things up. I have an open script, so I will set the default menu there.

Thanks as well Steven. I had to chuckle because in reading through posts on the subject of account management I have seen many responses from you recommending External Server Authentication. So I guess I kind of expected it. LOL

In this case, I don't actually want to give these users access to the server it's self. One because I don't want them accessing shared resources on the server. And two, because that way there is no need to buy additional user licenses for the server for multiple users who will have no need to access the server.

n this case, I don't actually want to give these users access to the server it's self. One because I don't want them accessing shared resources on the server. And two, because that way there is no need to buy additional user licenses for the server for multiple users who will have no need to access the server.

This has nothing to do with External Server Authentication in FileMaker.

Steven

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.