Page 1 of 1
Lead Search using partial details
![Post Post](./styles/vicidial/imageset/icon_post_target.gif)
Posted:
Thu Oct 01, 2015 7:14 pm
by fibres
Hi Guys
I am wondering if there is a way to change the lead search behaviour to allow wildcards? Or put them in by default?
We are using the Last Name field for company name on a customer installation and the need to be able to put say 'vicidial' in the search box and have it come up with and companies with vicidial anywhere in the name.
Re: Lead Search using partial details
![Post Post](./styles/vicidial/imageset/icon_post_target.gif)
Posted:
Fri Oct 02, 2015 4:45 am
by mflorell
Last Name is already a horrible field to search by, adding in wildcards would just make the search slower and lock the system for several seconds for every search. Sure it would be possible to add this, but noone has contributed or paid for such a feature at this time.
Re: Lead Search using partial details
![Post Post](./styles/vicidial/imageset/icon_post_target.gif)
Posted:
Fri Oct 02, 2015 10:41 am
by fibres
Ok. Is it not as simple as just adding %searchstring% to the sql query? I have tried adding the % into the search box but doesnt seem to work.
Ill have a look at the code in a bit. This is a system that is never going to have more than 100k or so leads in it and is a manual dial system with <10 agents.
Re: Lead Search using partial details
![Post Post](./styles/vicidial/imageset/icon_post_target.gif)
Posted:
Fri Oct 02, 2015 1:15 pm
by mflorell
You would have to change the SQL around it from using = to using LIKE for that to work, and you would have to do it conditionally depending on the wildcard character being present or not.
Re: Lead Search using partial details
![Post Post](./styles/vicidial/imageset/icon_post_target.gif)
Posted:
Fri Oct 02, 2015 4:49 pm
by fibres
Is the SQL query in the main agc/vicidial.php or is it in a function somewhere?
Re: Lead Search using partial details
![Post Post](./styles/vicidial/imageset/icon_post_target.gif)
Posted:
Fri Oct 02, 2015 6:50 pm
by fibres
Ah no found it.
Changine the = to like has made this work. Will be interesting to see what performance on searches is like on the system with more than the 3 leads I have on my test system!
Ill report back what its like.