close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

searching with data assist where field contains text not exact match

Thread began 2/22/2018 6:24 am by gb261593 | Last modified 2/23/2018 10:03 am by Ray Borduin | 1765 views | 6 replies |

gb261593

searching with data assist where field contains text not exact match

I have a Data Assist 2 and have used it to develop a query where it searches through 3 fields - forename, surname and firm. It works fine if the exact name is entered but I want it to find data which is partially entered eg finds Timothy and Tim etc if Tim is entered in the forename entry.
Is this possible and if so, how do I do it.

Sign in to reply to this post

Ray BorduinWebAssist

Yes. You can do an "includes" or "begins with" search instead of an exact match. If you attach the results page, I could show you the code that needs to be updated.

Sign in to reply to this post
Did this help? Tips are appreciated...

gb261593

Thank you. I attach the results page - not tidied up but working OK.

Sign in to reply to this post

Ray BorduinWebAssist

on lines 19-21 you have:

$WADbSearch1->addComparisonFromEdit("surname","surname","AND","=",0);
$WADbSearch1->addComparisonFromEdit("forename","forename","AND","=",0);
$WADbSearch1->addComparisonFromEdit("contacts.clientid","clientid","AND","=",0);



you can update it to:

$WADbSearch1->addComparisonFromEdit("surname","surname","AND","Begins With",0);
$WADbSearch1->addComparisonFromEdit("forename","forename","AND","Begins With",0);
$WADbSearch1->addComparisonFromEdit("contacts.clientid","clientid","AND","=",0);
Sign in to reply to this post
Did this help? Tips are appreciated...

gb261593

Thank you. This works fine putting in the first part of the name. Is it possible to have it look for results that contain the entered text? For example, if I put in 'liam' in the surname field I would like it to be able to find Wiliams, Wiliamson, etc.

Sign in to reply to this post

Ray BorduinWebAssist

Use "Includes" instead of "Begins With"

Sign in to reply to this post
Did this help? Tips are appreciated...

gb261593

Excellent. Thank you very much - that works perfectly.

Sign in to reply to this post

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...