controller.find();
gebruikersnaam = globals.gebruikersnaam;
wachtwoord = globals.wachtwoord;
controller.search();
if(controller.getMaxRecordIndex()==0)
{
plugins.dialogs.showDialog(‘Waarschuwing’,‘Sorry, Geen geldige gebruikersnaam of wachtwoord!’,‘OK’)
controller.loadAllRecords()
controller.show()
}
On the field: global.wachtwoord I have set the property: OnLeave, to the method above. It won’t start when I am leaving the field.
What am I doing wrong?
This script performs a search on the table where the controller is build on.
Is this your intention? In other words , are the passwords stored in the same table as the controller is build on?
If not, you should build the same script on the form where the username and password are.
assuming:
scriptname is “checkPassword”
formName is “login”
formName is build on table users with fields “user” and “password”
..you could call this script via onLeave script attached to “globalField” on the controller like this:
onLeaveScript
forms.login.checkPassword();
PS: I assume you have a specific reason for handling passwords this way. (Servoy has a user/password check linked to security)
PS: I assume you have a specific reason for handling passwords this way. (Servoy has a user/password check linked to security)
Yes I know, but we always built ouer own acces to all ouer solutions. Why? In practice, a lot of ouer users (customers) do not have the knowledge to administrate such a kind of login-structure. (some of them, can’t even read English!) So we build ouer own (simple) system, where a super-user can add another (new) user to the system and put this user in a categorie.
Categories are: Super-User, User (can’t delete records), Editer (can’t delete or create records, only edit) Guest (can only view data)
So the customer can simple administrate the solution.
My next question is: Can I automate the login (I mean the already built-in login) bij methods??
We do this in Filemaker, with a special plugin. DIALOGFM
AH I FOUND THE BUG!
THe script is’nt triggering because I use globals.wachtwoord with displaytype: password. If I change it to TEXT_FIELD than the script is triggering!