I am finishing my database, but I would like to implement the following:
If the user A log in will be forwarded to layout A if user B logs in will be redirected to layout B.
Is this possible in FileMaker?
Using the OnFirstWindowOpen script trigger: FileMaker Pro 16 Help
Write a simple script that does something like:
If [ Get(AccountName) = "User A" ] Go To Layout [ "Layout A" ]Else If [ Get(AccountName) = "User B" ] Go To Layout [ "Layout B" ]Else Go To Layout [ "Default Layout" ]End If
If [ Get(AccountName) = "User A" ]
Go To Layout [ "Layout A" ]
Else If [ Get(AccountName) = "User B" ]
Go To Layout [ "Layout B" ]
Go To Layout [ "Default Layout" ]
If you need to do it by role, you can also use privilege sets, and change Get(AccountName) with Get(AccountPrivilegeSetName) or any other number of functions to make your login script conditional.
Thanks for your help, but I encountered a small problem, which I might solve in the script
My database has about 80 teachers and each has its own layout.
In other words, John belongs to layout A, Kevin belongs to layout B, Lukas belongs to layout C and so on.
Rather than making 80 layouts, you should be making one layout that responds differently to 80 users.
Studying a new solution based on the script.
If you could post details about what your layout/app is doing, we may be able to offer further suggestions.
The ideal would be that when a teacher enters the database he would go to a layout with his classes and disciplines that he teaches.
In that case, you would just need to do a simple find for those classes.
You could modify the OnFirstWindowOpen script to do something like:
Enter Find Mode [ pause:no ]Go To Layout [ "Classes List" ]Set Field [ Class::Teacher ; Get(AccountName) ]Perform Find
Enter Find Mode [ pause:no ]
Go To Layout [ "Classes List" ]
Set Field [ Class::Teacher ; Get(AccountName) ]
You are not storing that data in 80 separate tables, so 80 layouts are not needed. If you want to constrain views to smaller sets of data, you should do so either with finds, or with privilege sets.
I might use the find AND the privilege sets (users can ONLY see their records regardless of layout or find). This is called "record-level access", should OP care to search for other examples.
FileMaker Pro 16 Help Authorizing access to files
FileMaker Pro 16 Help Editing record access privileges
I will try to deploy to the database, if me are in difficulties I will contact you.
I'm having a little difficulty with layouts.
In the script is limited to one user, but I need more for example.
Layout A -> 80 accounts (after login, being redirected to this layout)
Layout B -> 15 accounts (after login, being redirected to this layout)
Layout C -> If it is none of the others.
Thank you for your help.
The Accounts can be assigned a particular Privilege Set. And THAT privilege set can be tested. Are you setting these accounts in FileMaker or using External Authentication?
I'm using FileMaker
But the problem is the redirection of layouts
And we are all talking about FileMaker! Did you study the help topics on Accounts and Privileges? You can assign these with 'in FileMaker', and/or you can use External Authentication. We are asking how you set these up? What are your privilege sets like?
Start this this page (follow links if any):
I think they do not have to do with account privileges, the only question is how does the above script work with more people and not just with one.
John access layout A but not B and C.
Kevin access layout A, but not B and C.
Sam access layout A but not B and C.
Note: After login they are automatically forwarded to the specific layouts
Elliot access to layout B, but not to A and C.
Do all of these people login, if so they have accounts, right? These accounts have passwords. The accounts are assigned to a privilege set. Are we speaking about the same thing?
1. How do you know that John is in the database and needing to ONLY see Layout A?
2. Does John have a required login (with password)?
3. If John does login, what Privilege Set is assigned to John?
4. If John does NOT login, how do you know to script that he only sees Layout A?
I’m needing a little more of the process that happens now (or that you want to happen).
5. when you work in the database, do you login? Do you have Full Access? (Presuming yes, but I wanted to verify that you can set up logins for others).
Thank you for your patience in allowing me to ask questions that may get you better solutions for your needs!
Sent from miPhone
Yes, everyone who accesses the database has an account.
To answer your questions, I just want to say that before saying that I was having difficulties I successfully expressed the script posted here, and when I logged in with the test user account it went to Layout A if I logged in with the account user zz he went to layout B, if he logged in with the user account Admin he went to layout C.
I was happy because the script worked but the same only gave an account or only the user account zz was able to go to Layout B and the test user only managed to go to Layout A, all others went to Layout C .
(Automatically after login)
Having a new problem I posted here to try to find a new solution.
Responding to your questions:
1- John is a 5th grade music teacher, that is, he will only have access to Layout A (which is intended for teachers in general), and his classes as well as the records of his classes, everything else is restricted.
2- John has a mandatory login with name and password.
3- John has a set of special privileges in his account that only allow access to the records and their classes and to Layout A, everything else is restricted.
4- If John does not log in he will not be able to enter the database.
5- To access the database all have to authenticate, I am the only one who have full access.
Basically what would be ideal was the same thing as the script, only with more users.
Thank you for your help,
The idea is to make the branching dependent not on the Account (individual), but the Privilege Set (role).
fidalguito wrote: 1- John is a 5th grade music teacher, that is, he will only have access to Layout A (which is intended for teachers in general), and his classes as well as the records of his classes, everything else is restricted.
Which makes me think that you would have a Privilege Set „Teacher“. So, don‘t look for a specific account, but for a privilege set when deciding where to route a user to.
Ok. That helps! Now how many Privilege Sets do you have? There should (at the very least) be:
Full AccessRead Only (can be disabled)Edit Only (can be disabled)Guest (can be disabled)Layout-ALayout-BLayout-C
Read Only (can be disabled)
Edit Only (can be disabled)
Guest (can be disabled)
Yours may be named differently. John would have Layout-A AND any other accounts that use that.
So in your script, instead of testing each and every Account:
If Go to Layout (A)Else if test for the othersincluding Full AccessGo to Layout (...)use appropriate location Elseyou may or may not have a default blank layoutEnd If
Go to Layout (A)
test for the others
including Full Access
Go to Layout (...)
use appropriate location
you may or may not have a default blank layout
So this will be similar to you original script, but you will use the function
Retrieving data ...