Lookup field - drop down does not work- Radio buttons yes

If you're a new user of AppGini, feel free to ask general usage questions, or look for answers here.
Post Reply
Nicolas
Veteran Member
Posts: 44
Joined: 2015-12-08 08:08
Location: Barcelona
Contact:

Lookup field - drop down does not work- Radio buttons yes

Post by Nicolas » 2015-12-08 18:42

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

User avatar
a.gneady
Site Admin
Posts: 1354
Joined: 2012-09-27 14:46
Contact:

Re: Lookup field - drop down does not work- Radio buttons yes

Post by a.gneady » 2015-12-08 19:51

Hmm .. You could try debugging this issue .. Please see the screenshot below:
inspect-xhr-requests-firefox.png
inspect-xhr-requests-firefox.png (147.27 KiB) Viewed 7641 times
The inspector would report any connection errors. If you see an error, please describe it here to see what went wrong.
:idea: AppGini plugins to add more power to your apps:

Nicolas
Veteran Member
Posts: 44
Joined: 2015-12-08 08:08
Location: Barcelona
Contact:

Re: Lookup field - drop down does not work- Radio buttons yes

Post by Nicolas » 2015-12-10 18:51

Thank you for your quick answer... I've done what you say and so far i don't get any error...
NetworkXHR.GIF
NetworkXHR.GIF (72.43 KiB) Viewed 7623 times
Maybe you could have a look yourself?
site is on www.teker.es/gestion
and credentials can be sent over mail....

Thank you

Nicolas
Veteran Member
Posts: 44
Joined: 2015-12-08 08:08
Location: Barcelona
Contact:

Re: Lookup field - drop down does not work- Radio buttons yes

Post by Nicolas » 2015-12-10 19:17

This model is not a real working one, just learning, but the base is what counts.
Thank you

User avatar
a.gneady
Site Admin
Posts: 1354
Joined: 2012-09-27 14:46
Contact:

Re: Lookup field - drop down does not work- Radio buttons yes

Post by a.gneady » 2015-12-10 21:38

It requires login. You could send me a user/pass via PM.
:idea: AppGini plugins to add more power to your apps:

Nicolas
Veteran Member
Posts: 44
Joined: 2015-12-08 08:08
Location: Barcelona
Contact:

Re: Lookup field - drop down does not work- Radio buttons yes

Post by Nicolas » 2015-12-11 16:47

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

User avatar
a.gneady
Site Admin
Posts: 1354
Joined: 2012-09-27 14:46
Contact:

Re: Lookup field - drop down does not work- Radio buttons yes

Post by a.gneady » 2015-12-14 04:56

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.
:idea: AppGini plugins to add more power to your apps:

Post Reply