close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Searching using comma separated list

Thread began 8/02/2012 10:09 am by jon211112 | Last modified 8/03/2012 11:15 am by Jason Byrnes | 1748 views | 8 replies |

jon211112

Searching using comma separated list

Hi there

I am trying to achieve a search like this.

My data has a field which contains a comma separated list of keywords. The visitor can enter a list of comma separated keywords. I want to return results where the data contains any of the words entered in the search.

I can see it's straight forward for the results to contain any keywords but not if a field contains a separated list.

My thinking is I explode the field into an array but I'm not sure how Data Bridge Search can handle that.

Your advice would be very much appreciated.

Many thanks

Jon

Sign in to reply to this post

Jason ByrnesWebAssist

In Data Assist Search, use a Keyword search type, and set the OR Separator to be a comma.

Sign in to reply to this post

jon211112

Thanks Jason.

I've done that and it's not working but I think it's because my data has a comma separated list and so does the search string.

To clarify, my data has something like this in a single field:

UK, USA, FR, ES, IT

The search string may have something like this:

UK, FR, DE

The record needs to be selected because there is at least one match (UK and FR will match in this case).

How can I do this?

Cheers

Jon

Sign in to reply to this post

Jason ByrnesWebAssist

Using the Key Word search type, and setting the OR comparison to a coma with a space:
", "

should work, just make sure to select the includes comparison type.

send a copy of the page if continue to have troubles.

Sign in to reply to this post

jon211112

Thanks Jason.

I'm afraid it's still not working.

I have a record containing a field with this data:

"wales, ld"

and a search box containing:

"ld, np"

so I should be getting the record because of the match for "ld".

I've removed all the other elements in the search so I just have this one, have done it as you suggest but it's returning no results.

Any ideas?

Cheers again

Jon

Sign in to reply to this post

Jason ByrnesWebAssist

send a copy of the page if continue to have troubles.

Sign in to reply to this post

jon211112

Thanks Jason. Where should I send it to?

Sign in to reply to this post

jon211112

Hi Jason

I'm an idiot! I had the wrong variable in there. I been looking at it for so long, I just didn't see that. It seems to be working a treat now.

Thanks again for your help.

Jon

Sign in to reply to this post

Jason ByrnesWebAssist

Ok, glad to hear it is working.

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...