Newbies piedral Posted December 10, 2000 Newbies Posted December 10, 2000 Is there a script that when user name and password are entered correctly within database "A", it will then open database "B" that corresponds with the individual who has been assigned to that database. Database "A", would be used to authenticate access - It would contain 3 fields username/password/and database Any help would be appreciated!
Chuck Posted December 11, 2000 Posted December 11, 2000 Perhaps something like this: If [ User_Name = "Bill" and Password = "abc" ]
Vaughan Posted December 11, 2000 Posted December 11, 2000 Chuck's suggestion will require making a hard-coded script for each user, and it will break every time they change their passowrd. Lots of maintenance! Instead change to find mode and present them with a layout that has a field for userid and password. They click the find button and if one record is found the script opens the other database otherwise it won't. Much easier to maintain, adding users is just a matter of creating new records in db A. One problem though -- though it's a nice looking passord system, the data security it offers isn't worth squat. Why? Because for the password system to work the databases will need to be opened with a generic default password that allows the maximum amount of access to the data. Otherwise, after passing your password system the user be asked for another password, the real FMP access privileges password for the database. And if you think that's OK then why not forget about the first password system and use FMP's built-in password security in the first place and save all that development time! It's like having a fancy keypad on the front door of the house but leaving all the windows open around the side. Just a minor point: FileMaker Pro access privileges only authenticates passwords, there are no usernames. This is true for database access through the FMP client and through a web browser (despite the fact that the web browser authentication asks for a userid, it is ignored by FMP -- it can be left blank). Passwords themselves cannot be worked with directly in FMP, but the group that thery are associated with can through the Status[CurrentGroup] function. There is also a Status[CurrentUserName] function but it's of little use because it isn't authenticated. I'd stick with FMP built-in password system as it's the only secure method. This means creating a password and group for each user (or each class of user) inside each database. [This message has been edited by Vaughan (edited December 11, 2000).]
Newbies piedral Posted December 12, 2000 Author Newbies Posted December 12, 2000 Thanks for the info. I posted the message, because no one had replied to my previous posting. What I am trying to do is create a website, that will authenticate user access to their database via the web. The site would have a number of users and databases, therefore I would need to make sure that he/she is accessing the correct file, without seeing other databases and users.
Newbies piedral Posted December 12, 2000 Author Newbies Posted December 12, 2000 Thanks for your help, the script works well. I am now trying to create more users and databases and I am having a problem. My script reads like this: If [username="test"] Perform Script [sub-scripts,External: "datetest.fp5"] Note: when user matches test it opens DB, but does not take me to the datetest.fp5 Else End If If [username="den"] Perform Script[subscripts,External: "test.fp5"] Note: This works, it opens test.fp5 and brings me to database Else If [username="king"] Perform Script [sub-scripts, External: "Tour.fp5"] Note: same as above works well I think my problem is in the else, or end if, but I cannot seem to figure it out. Any suggestions would be appreciated. Thanks again, you're the best!
aricm Posted December 22, 2000 Posted December 22, 2000 I think you need an End If statement for each conditional. The Else step for that test also goes inside the IF step (before the End If). Try this: If [username="test"] Perform Script [sub-scripts,External: "datetest.fp5"] Else If [username="den"] Perform Script[subscripts,External: "test.fp5"] Else If [username="king"] Perform Script [sub-scripts, External: "Tour.fp5"] End If End If End If Kind of makes you wish for a "Switch" script step, huh?! [This message has been edited by aricm (edited December 21, 2000).]
yafreax Posted December 22, 2000 Posted December 22, 2000 Filemaker will take you to the database that last performed a script step, simply add a Exit Script, Halt Script, Or Pause/Resume (1 sec) script at the end of the last database that you want open. If you want one to open, then run more steps in the originally, then just have a script in whichever the DB you want to be open that says Pause/Resume and call it from the original. hope i'm understanding your question Jeremy
Recommended Posts
This topic is 9007 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now