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.
Look-up field problem
Re: Look-up field problem
Hi,
I would guess that your SQL query fails. That's why you get the twirling image.
Try replacing
by
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
Code: Select all
SELECT `all_contacts`.`contact_ID`, `all_contacts`.`company` FROM `all_contacts` WHERE `all_contacts`.`contact_type` = 'Customer' ORDER BY 2
Any help offered comes with the best of intentions. Use it at your own risk. In any case, please make a backup of your existing environment before applying any changes.
-
- Veteran Member
- Posts: 159
- Joined: 2019-02-03 17:26
Re: Look-up field problem
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.