Hi Bruce, I found the problem and I don't know if it's by design or a bug.
The Appointment table has a primary key and a key on the customer's last name. Now, on the field's properties on the form I have:
From table Pacientes(this is the customer table)
Order by Nombre(this is the customer's name)
Value field Paciente:ID(this is the unique key)
Description field Paciente:Nombre
and I have "display description instead of value" checked.
I did not have a key defined on the "Nombre" column, so nettalk was generating the following code in the ValidateRecord routine
loc:ok = p_web.GetDescription(Pacientes,Paciente:KID,Paciente:KID,Paciente:ID,Paciente:Nombre,p_web.GetValue('Cita:Paciente')) !4
notice the second and third parameters are the same variable, as soon as I created a key on the Name column nettalk generated the third parameter with Paciente:KNombre(which is the Nombre key)
loc:ok = p_web.GetDescription(Pacientes,Paciente:KID,Paciente:KNombre,Paciente:ID,Paciente:Nombre,p_web.GetValue('Cita:Paciente')) !4
And that solved the problem.
Thanks and Happy new year.