It must be very simple, but I can't get the hold of this dialog stuff.
I want a user to change his password.
He logs in with Lidnr, which is checked agains Lid_Id in the table. This works.
The current passord (OudeWachtwoord) is checked against the real one (wachtwoord). This also works.
The new password is typed in twice: NieuweWachtwoord and NieuweWachtwoord2. These must be identical. This works, too.
Before validation
Now I want to assign the value of NieuweWachtwoord to the field wachtwoord in the table Leden.
This is what I have now in After validation. I sort of composed it from Help file examples:
I don't get an error message, but the value in the field is not changed either.
What do I do wrong, or even better: how should I do it right?
I want a user to change his password.
He logs in with Lidnr, which is checked agains Lid_Id in the table. This works.
The current passord (OudeWachtwoord) is checked against the real one (wachtwoord). This also works.
The new password is typed in twice: NieuweWachtwoord and NieuweWachtwoord2. These must be identical. This works, too.
Before validation
Code:
dim JuisteWachtwoordOud as c dim level as N JuisteWachtwoordOud = lookup("<ADB_Path>\leden","Lid_Id=" + quote(Lidnr),"wachtwoord") if OudeWachtwoord <> JuisteWachtwoordOud then currentform.has_error = .t. currentform.error_message = "Ongeldige Loginnaam - Wachtwoordcombinatie." end if if NieuweWachtwoord <> NieuweWachtwoord2 then currentform.has_error = .t. currentform.error_message = "U heeft niet twee keer hetzelfde nieuwe wachtwoord ingevoerd." end if
Now I want to assign the value of NieuweWachtwoord to the field wachtwoord in the table Leden.
This is what I have now in After validation. I sort of composed it from Help file examples:
Code:
dim t as P dim rec as N if eval_valid("PageVariables.Lid_Id") then t = table.open("[PathAlias.ADB_Path]\leden") t.order("Lid_Id") rec = t.fetch_find(PageVariables.Lid_Id) if (rec > 0) then t.wachtwoord = Nieuwewachtwoord end if t.close() end if
What do I do wrong, or even better: how should I do it right?
Comment