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.

Data Separation Model - Using Script to Add Accounts to both Files

Featured Replies

I am building a solution using The Separation Model. What I am trying to do is allow a User to add an Account via Scripting. I want to be able to use this same solution for multiple businesses and thus I plan on making it available to them only by WebDirect and FMGo, so it is a necessity to do this via scripting (so I don't have to manually add Accounts anytime the business wants to add a new user).

 

I am able to add the Account via script to my UI, but I can't figure out how to add it to the Data File. I may not have tried everything I can think of yet, but I have attempted to the point of frustration. 

 

Any ideas?

  • Author

Figured it out (primitively). Here is what I ended up doing. 

 

UI Script:

Add Account [Account Name: Users::AccountName; Password: ********; Privilege Set: "Manager"; Expire Password]

Set Field [users::gSearch_User; Users::User_ID]

Open File [Open Hidden; "DataFile"]

Perform Script ["AddAccount" from file: "DataFile"]

 

DataFile Script:

Go to Layout ["Users" (Users)]

Enter Find Mode [ ]

Set Field [users::User_ID; Users::gSearch_User]

Perform Find [ ]

Add Account [Account Name: Users::AccountName; Password: ********; Privilege Set: "Manager"; Expire Password]

Close Window [Current Window]

 

I will add more to my scripts/buttons to ensure the only Users able to run this script are managers and also to select the appropriate Privilege Set.

 

One thing I didn't like is that upon login with FMGo, using the new Account Name and Password it requires you to change the password for both the UI and Data File (so it pops up to change the UI password, then immediately pops up to change the Data password... I could see that leading to confusion). Perhaps I can have the new user type the password in a global field, set that in the specify box, in the Add Account script step, then clear the global field in the script. Then turn of Expire Password. Also, I suppose that if the script was interrupted, there may be trouble. I am still tinkering with it...

If using FileMaker Server, and you should be in almost every instance, get out of the Account Management business by using External Server Authentication.  That way, the organization manages its own Accounts.

 

http://fmforums.com/forum/blog/13/entry-83-the-power-and-advantages-of-external-server-authentication-with-filemaker-server/

 

is a link to a BLOG post here on FM Forums about External Server Authentication.  There is also a Tech brief from FMI about this subject.

 

Steven

  • Author

Thank you... I will certainly be exploring this.

Excellent.  Just come back and post questions in the External Authentication Forum if you encounter problems or just want more information.

 

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.