Hi,
I have a tableA consist of name, address, age.
I have another tableB consist of name, address, age and more fields.
I create a form using tableB, the name is using Text Auto-Complete. When the name entered can be search from tableA, I need to auto display the value for address and age, user can change if needed since it is a textbox.
I tried putting the following under Ajax event > name onChange but it does not work. Can anyone kindly help? Thanks.
sc_select(dataset, “select * from tableA where name =’{name}’”);
if (false == {dataset})
{
// Error while accessing database
}
elseif ({dataset}->EOF)
{
// No record found
}
else
{
// Record found
{address}={dataset}->fields(‘address’);
{age}={dataset}->fields(‘age’);
}