Managing Accounts in a Multi-file Solution

Do you have a FileMaker solution made of multiple files? This blog will show how to easily manage accounts for a multi-file solution.

FileMaker’s accounts are set up within each file. This means every time you want to add or delete a user, or reset a password, those changes need to be made in every file the user touches. Luckily, a series of script steps can streamline this process.

The concept behind this technique is straightforward. We will use one file as the main file to handle all interactions required to gather the data we need. Then, we will call subscripts in each of the solution files to update their account info from the main file.

Graphic showing logic behind this account management technique

Let’s use Add User as an example.

I have this simple user interface that lists all users I have from a USER table.

User interface showing all accounts in a solution

When I want to add a new User, I will click on this Add button, which will pop up a card window to gather information about this new user. We will add the user’s full name, FileMaker account name, password, and privilege set.

When we hit Save, the script will take the information I entered, and pass it to subscripts in the solution files.

Let’s take a look at one of the subscripts. This subscript receives information like account name, password, and privilege set, that I gathered on the main file via a script parameter. 

FileMaker subscript

First, it tries to delete any account with the same account name, just in case. Then, it uses that info with the “Add Account” script step to create the account.

FileMaker subscript

With the Add Account script step, we can use variables to dynamically specify the account name and password, which is very convenient. However, we can’t do this with the privilege set, so if we want our script to support multiple privilege sets, we will need to use branching logic to handle it, like in this blog post.

As for the option to force the user to reset their password with a multi-file solution, I’d advise not using it at all. If this setting is checked  for all of the new accounts created, the user would have to reset it for each file.

FileMaker card window showing option to make user change password upon sign-in

Instead, if you want to give users the option to manage their own password, you can build a UI to handle the interaction, collect the new password they want to use, and then pass it to subscripts within each solution file and use the Reset Password script step to update the password in all files (shown in the demo file).

If you use the same privilege set names across your solution files, you can copy and paste all the subscripts from one file to another. However, if you have different privilege set names in different files, then you will have to customize your subscripts in each file.

Similar to how Add User is built, we’ve also built subscripts for Deleting accounts, resetting an account password, and activating and deactivating accounts. So when I do those actions in my main file, all the accounts in the solution files will be updated together.

We have attached this demo file below. Feel free to reference it when creating your own account management features. We also have a YouTube video that demonstrates this concept.