close ad
Databridge V2 with MySQLi support IS Now Available!
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

DataAssist Search / Result / Clear Result

Thread began 3/08/2009 3:30 pm by muddysmurf314415 | Last modified 9/16/2009 11:27 am by muddysmurf314415 | 4391 views | 12 replies


Clearing your DataAssist search results

I have struggled with this too. Most of the advice didnt quite work the way it was intended and that results page tenaciously held onto the search results. I found a non invasive solution using two conditional statements. I have tested it and it seams to do the trick. I thought I'd post it here as it may be of use to others.

When data assist conducts a search, it stores that fact in a session variable. That session variable will have a custom name. This is easily located by looking for where it is set in the code. So first, you put a conditional statement in that sees when the session variable for that search result is set. If so, add a link with your own custom url string trigger attached.

<cfif (isDefined("Session.WADbSearch1_officials_Results") AND Session.WADbSearch1_officials_Results NEQ "")> / <a href="officials_Results.cfm?clearsearch=true">Clear Search and Return to Results</a></cfif>

I added this code right beside the New Search link in the header as that is where I wanted it to appear if a search had been initiated. Then, at the top of the code, before the cfscript code that deals with the session variable, I added this bit of conditional logic:

<cfif (isDefined("URL.clearsearch") AND URL.clearsearch EQ "true")>
<cflock timeout=20 scope="Session" type="Exclusive">
<cfset StructDelete(Session, "WADbSearch1_officials_Results")>

Which in a nutshell detects if your custom url string is present and if so clears out the session variable set via the search. You get a clean set of results returned in the SQL statement and because the session is no longer present, the link to clear the results does not appear.

Hope this helps. I know its a hack solution but it works and could be easily adapted for ASP or PHP.

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





Ease of use


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