Look-up field problem

If you're a new user of AppGini, feel free to ask general usage questions, or look for answers here.
Post Reply
kanklovitch
Posts: 4
Joined: 2019-02-03 17:26

Look-up field problem

Post by kanklovitch » 2019-02-03 19:15

Hi everyone, this is my very first post and I a still have a lot to learn. I have an all_contacts table with a field called contact_type with these list values - Customers, Friends, Leads & Others. In my customers table I have a lookup field to all_contacts to look-up customers. The following code - SELECT `all_contacts`.`contact_ID`, `all_contacts`.`company` FROM `all_contacts` WHERE `all_contacts`.`contact_type` = `Customer` ORDER BY 2 is not working.

The default query - SELECT `all_contacts`.`contact_ID`, `all_contacts`.`company` FROM `all_contacts` ORDER BY 2 works fine but of course I than get all of my contacts instead of just the customers. In my application when I click on my look-up field nothing shows up at all, I just get the message "Searching" with that round twirling image.

Thanks in advance, I truly love using and learning AppGini. The most important software I use to manage my business.

pböttcher
AppGini Super Hero
AppGini Super Hero
Posts: 377
Joined: 2018-04-01 10:12

Re: Look-up field problem

Post by pböttcher » 2019-02-04 10:16

Hi,

I would guess that your SQL query fails. That's why you get the twirling image.

Try replacing

Code: Select all

SELECT `all_contacts`.`contact_ID`, `all_contacts`.`company` FROM `all_contacts` WHERE `all_contacts`.`contact_type` = `Customer` ORDER BY 2
by

Code: Select all

SELECT `all_contacts`.`contact_ID`, `all_contacts`.`company` FROM `all_contacts` WHERE `all_contacts`.`contact_type` = 'Customer' ORDER BY 2

kanklovitch
Posts: 4
Joined: 2019-02-03 17:26

Re: Look-up field problem

Post by kanklovitch » 2019-02-04 14:28

Thank you very much, that works perfectly. The funny part is I thought I had tried that myself. Now, after a couple of days onto the next rock in the road. I really appreciate your help.

Post Reply