What you describe is native to FMP. You seem to be recreating the same thing that came free with your purchase of FMP.
This has a list of Acct and PrivSet, you can double-click on an account and see PrivSet Details...
Why create it again when it already exists in the same file? All your re-creation of the system does is make your Dbase less secure with no added benefit.
I'm creating this because I don't want to give any person developer [Full Access]. I have to hand off this database that I created and need to set up an Admin person the ability to create users, reset password, etc.
"I'd like to see a list of these Accounts (users) and their PrivilegeSets in a portal on the same layout, also if possible with the ability of clicking on a user in the portal and having that user name and privilege set automatically fill the AccountName field and Privilege Set field. "
This sounds like you want to copy information in a selected portal row into fields on the layout. This is a simple thing to script:
Set Field [LayoutsTable::Field ; PortalTable::Field]
Do one such script step for each field in your portal.
In layout mode, select all the fields in your portal row and choose Format | Button Setup...
Select the above script and you're good to go.
This is great. Thank you. I just have, hopefully, one small issue. It seems to think I'm over-writing the current record that was in the field. When I click out, I get the error message, "AccountName is designed to contain unique values only. Allow this duplicate value?" With three buttons: "Revert Record | Yes | No". How can I get it to remove the current record? I've tried a few things but nothing is working.
I have one other question that hopefully can be resolves with this Account Management Layout. I have created scripts to add a new account, reset passwords, etc. I have not been successful at creating a script that will change the Privilege Set. Is there a way to do that without having to delete the user account and recreate it?<!-- / message -->
"It seems to think I'm over-writing the current record..."
That's exactly what's happening.
"How can I get it to remove the current record?"
Instead of removing that record, it should find that record so that the user can edit it.
In your script, modify it to do this:
Set Variable [$Account; Value: YourPortalTable::YourAccountNameField]
Enter Find Mode
Set Field [YourLayoutTable::YOurAccountNameField; $Account]
set error capture [on]
If [ Get (FoundCount) = 0 /* no account record found */ ]
Show custom dialog ["Error, no account record found"]
Many new users get confused the first time they try to add Set Field to a script. See the following link for step by step instructions if you need help:
Selecting an "All" option with checkboxes
[Edit note: fixed minor typo]
Thank you. It works perfectly!!