Page 1 of 1
Lookup field - drop down does not work- Radio buttons yes
Posted: 2015-12-08 18:42
by Nicolas
Dear all,
As I am practising, I took the invoicing example so I have a base and I have a strange performance on the server.
When I link two tables and want a drop down field box to select from names from another table it shows a the text Searching... and a small circle spinning but nothing comes out...
when configuring the output as a radio button.... it shows data to select..... no change on the select... just how to show the results....
If there are 2/3 records on the parent table... no problem, but if this is a list of representatives to clientes.... or invoices and customers.... not too practic....
what can be causing this? the server? any hint???
Thank you
Nicolas
Re: Lookup field - drop down does not work- Radio buttons yes
Posted: 2015-12-08 19:51
by a.gneady
Hmm .. You could try debugging this issue .. Please see the screenshot below:

- inspect-xhr-requests-firefox.png (147.27 KiB) Viewed 7648 times
The inspector would report any connection errors. If you see an error, please describe it here to see what went wrong.
Re: Lookup field - drop down does not work- Radio buttons yes
Posted: 2015-12-10 18:51
by Nicolas
Thank you for your quick answer... I've done what you say and so far i don't get any error...

- NetworkXHR.GIF (72.43 KiB) Viewed 7630 times
Maybe you could have a look yourself?
site is on
www.teker.es/gestion
and credentials can be sent over mail....
Thank you
Re: Lookup field - drop down does not work- Radio buttons yes
Posted: 2015-12-10 19:17
by Nicolas
This model is not a real working one, just learning, but the base is what counts.
Thank you
Re: Lookup field - drop down does not work- Radio buttons yes
Posted: 2015-12-10 21:38
by a.gneady
It requires login. You could send me a user/pass via PM.
Re: Lookup field - drop down does not work- Radio buttons yes
Posted: 2015-12-11 16:47
by Nicolas
Hello
I was trying to figure out what select was related to the lookup field and I tried to view the file invoices_autofill.php, in which it starts the look up and I found this strange long select....
sql("SELECT `clients`.`ClientID` as 'ClientID', `clients`.`NFiscal` as 'NFiscal', `clients`.`NCom` as 'NCom', `clients`.`contacto` as 'contacto', `clients`.`CIF` as 'CIF', `clients`.`direccion` as 'direccion', `clients`.`codpost` as 'codpost', `clients`.`ciudad` as 'ciudad', `clients`.`provincia` as 'provincia', `clients`.`pais` as 'pais', `clients`.`telefono` as 'telefono', `clients`.`email` as 'email', `clients`.`website` as 'website', `clients`.`comments` as 'comments', IF( CHAR_LENGTH(`Comercial1`.`ComID`) || CHAR_LENGTH(`Comercial1`.`nombre`), CONCAT_WS('', `Comercial1`.`ComID`, '-', `Comercial1`.`nombre`), '') as 'ComID', IF( CHAR_LENGTH(`Comercial1`.`nombre`), CONCAT_WS('', `Comercial1`.`nombre`), '') as 'resp_nombre', IF( CHAR_LENGTH(`Comercial1`.`apellido`), CONCAT_WS('', `Comercial1`.`apellido`), '') as 'resp_apellido' FROM `clients` LEFT JOIN `Comercial` as Comercial1 ON `Comercial1`.`ComID`=`clients`.`ComID` WHERE `clients`.`ClientID`='$id' limit 1", $eo);
while on appgini app generator on the origin field it is set as Default (show all records on parent table)
Where does all this long select comes from????
I have version 5.42 revision 764
Thank you
Re: Lookup field - drop down does not work- Radio buttons yes
Posted: 2015-12-14 04:56
by a.gneady
autofill file is used for populating auto-fill lookup fields. The query above retrieves all fields from the parent record and then responds to the request with the values needed to populate the auto-fill lookup. The reason for retrieving all fields is for efficiency as the same file is used for all autofill fields, and writing a separate query for each field would cause unnecessary code complexity.