NetTalk Central
NetTalk Web Server => Web Server - Ask For Help => Topic started by: carlossm on December 31, 2013, 05:18:46 PM
-
Hi, I've got an odd problem. I have a webserver app created with the wizard. There is an update form to enter appointments. There are 4 fields with a browse button each to select Customer and other data from other tables. When I try to save an appointment, two of the fields give me a "XXX must be in file". I've checked the relationships and they are fine. There are two other columns that also have relationships to other tables and those are ok.
I'm using FM3 and ODBC driver with MySQL.
Thanks
Carlos San Miguel
-
Must be in file is a validation setting in the dictionary - ie something you've set on the field level validation tab.
Question is -are the values it is complaining about in the file?
Assuming they are - are there single component keys on the description fields in those lookup files?
Happy new year
Bruce
-
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.
-
>> by design or a bug.
By design.
If you have "Use Description instead of value" ticked on then a single-component key for the Description field must exist.
cheers
Bruce