There is a database table "CUSTOMER" (not PMTable but sits on the same MySQL database) created with the fields above
A database connection is created to the database and on the Dynaform, I have put the following SQL on the FIrstName and LastName fields correspondingly
SELECT FIRSTNAME FROM CUSTOMER WHERE PASSPORTNUMBER = @@PassportNumber
SELECT LASTNAME FROM CUSTOMER WHERE PASSPORTNUMBER = @@PassportNumber
There is no errors but I could not get the First Name and Last Name fields refreshed even when I update Passport Number on the form.
I tried to create a button with the follow script but it does not work neither. Can someone help please?
$db = "46351562218d923e118a881289223496";
$idDocRef = jQuery("#PassportNumber").getValue();
var dummy = getFieldById("FirstName").executeQuery();