Great Ideas. Always Flowing.

We are not happy until you are happy. Client satisfaction guaranteed. Whatever your needs and requirements, we have the skills and resources for the job!

Quick login...


Or... now make it easy with Facebook Integration
Connect via Facebook



Top Sellers

Frustrated over the lack of customization for your user's registration fields? Dynamically setup your DNN Portal with custom registration fields, layout, questions, and other core integration options......

Ultra Video Gallery is a brother product of Ultra Media Gallery, UVG allows you to upload videos in various format and automatically encode them to flv or H264 format, you also can add videos from internet or record live videos from your webcam.

Build high performance, completely customizable data-entry forms and views driven by your DNN and external databases. New built-in tools make it a snap to quickly create data entry forms, data views, and even database tables. Plus, add your own HTML, CSS, Javascript, SQL commands, stored procedures,

The most advanced DotNetNuke shopping cart on the planet. Easy to use e-Commerce, Secure Shopping Cart Software and SEO friendly. B2C / B2B Ecommerce Sites.

One stop solution for events calendar and events registration! FREE DOWNLOAD is available now!

Search Across Multiple Fields
Last Post 08-15-2012 05:04 AM by Ryan Bakerink. 8 Replies.
AddThis - Bookmarking and Sharing Button Printer Friendly
  •  
  •  
  •  
  •  
  •  
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages
NebRefUser is Offline
river guide
river guide
Posts:91
Avatar

--
08-01-2012 06:34 AM
    I would like to include a search function that will search across more than one field.  I know you recently added a "SearchAllField" feature to DUD but I don't find anything similar for Dynamic Views.

    Is there some other way to do this?  Can I somehow pass a querystring variable to my Dynamic Views page which will search for that variable among three separate fields and return the results of that search?

    I'm not sure how this would work since I can't select "OR" as my search condition.

    Any thoughts you may have would be helpful.

    Jim

    P.S. ~ I know I can do exactly what I want to do in DUD but the problem with that solution is that I need to export the results and I don't want to include all of the fields in that export.  DV allows me to limits fields for export, DUD does not.  Thanks!!
    Ryan BakerinkUser is Offline
    river guide
    river guide
    Posts:1900
    Avatar

    --
    08-02-2012 05:18 AM
    Hello Jim,

    What data source are you using for your specific Dynamic View? Where is your information coming from? The TempDUDPivot table?

    Please let me know this information.

    I would recommend enabling "Allow Free Form" which will disable all Search Field functionality that you have.

    But in turn what you can do is include the values in your Search Field into a filter in your CUstom SQL Query.

    For instance say you have 2 Search Filters:

    1.) Column: FirstName
    2.) Column: LastName

    Here's an example Custom SQL query:

    Select * from TempDUDPivot

    When enabling Allow Free Form the Search Fields become tokens available to you.

    So the query might now look like this for your Custom SQL Data Source:

    Select * from TempDUDPivot
    where ((FirstName like '%$(FirstName)%') or (UserName like '%$(FirstName)%') or ('$(FirstName)' = '')) AND
    ((LastName like '%$(LastName)%') or (UserName like '%$(LastName)%') or ('$(LastName)' = ''))

    So what I'm doing is pulling in all information where FirstName is like the FirstName and UserName column from the TempDUDPivot table. Now in actuality this query will probably pull in most results but I am just demonstrating how you can use multiple Field checks when Allow Free Form is enabled. A good example would be keywords:

    Select * from TempDUDPivot
    where ((Job like '%$(Keywords)%') or (Occupation like '%$(Keywords)%') or ('$(Keywords)' = ''))


    Let me know if you have any questions.

    Thanks,

    Ryan
    NebRefUser is Offline
    river guide
    river guide
    Posts:91
    Avatar

    --
    08-03-2012 12:28 PM
    Thanks, Ryan.

    How would I define my search in the Search Fields section of Data Views to search across these multiple fields I have identified in my Custom SQL Data Source?

    I assume I use the "SearchAllField" option but don't know what do to after that. As always, thanks for the help.

    Jim
    Ryan BakerinkUser is Offline
    river guide
    river guide
    Posts:1900
    Avatar

    --
    08-04-2012 05:15 AM
    Hello Jim,

    Unfortunately there isn't a way with Search Filters in Dynamic Views. You'll need to use the methodology as described above.

    Let me know if you have any questions.

    Thanks,

    Ryan
    NebRefUser is Offline
    river guide
    river guide
    Posts:91
    Avatar

    --
    08-07-2012 11:49 AM
    Ryan:

    I have read the blog entry on silent posts. Would I use Dynamic Forms to define the variable "Keywords" and then send that variable to Dynamic Views? I understand that if I check the box for Allow Free Form Query that the Search Fields feature is not avaiilable.

    As always....thanks for the help.

    Jim
    Ryan BakerinkUser is Offline
    river guide
    river guide
    Posts:1900
    Avatar

    --
    08-08-2012 06:36 AM
    Hello NebRef,

    Here's a summary:

    1.) Dynamic Forms will be the fields that a user will interact with. Upon submission, all of these search values will be passed through the querystring to the Page with Dynamic Views.

    2.) Dynamic Views needs to have one Search Field per Search Value that's being passed through the URL. The Querystring name and ColumnName of the Search Field must match up exactly in order to obtain the querystring values.

    2a.) Dynamic Views can hide it's search fields to avoid redundancy.
    2b.) Allow free form will disable the Search fields from actually constraining the results returned. However we need the Search Fields to collect the Querystring values posted from Dynamic Forms.

    3.) In our Dynamic View Custom SQL query, we'll want to manually build the where clause to return the records that the user is searching for.

    Let me know if this makes sense.

    Thanks,

    Ryan
    NebRefUser is Offline
    river guide
    river guide
    Posts:91
    Avatar

    --
    08-14-2012 03:00 PM
    Ryan:

    I have spent a ton of time on this trying to get it to work but still having issues.

    I've created a Dynamic Form with a name of "Keyword". This is a combo box that includes choices "Name1", "Name2", and "Name3".

    In advanced field options I have checked the box for "Pass values of this question to querystring variable." I have also created a Form Completion Event which sends the redirects to the Dynamic Views page.

    It appears that the variable is being passed since the URL for the Views page is as follows:

    http://MySite/Community/ClubSearchR...ord=Name1.

    In my Views page I have selected the option for "Custom SQL Query" and my query is as follows:

    Select * from TempDUDPivot where club1='$(Keyword)'

    I'm trying to get all the records from TempDUDPivot that have a value in the "club1" column of "Name1". However, the search returns no results. If I replace my Views query to the following, I get the proper results:

    Select * from TempDUDPivot where club1='Name1'

    Any help you could offer would be greatly appreciated.

    Thanks,

    Jim
    NebRefUser is Offline
    river guide
    river guide
    Posts:91
    Avatar

    --
    08-14-2012 03:05 PM
    Ryan:

    Sorry....sent you the same post twice by mistake.

    Thanks.

    Jim
    Ryan BakerinkUser is Offline
    river guide
    river guide
    Posts:1900
    Avatar

    --
    08-15-2012 05:04 AM
    Hello Jim,

    I think I see the issue.

    Firstly you're using this as your Custom SQL Data Source in Dynamic Views:

    Select * from TempDUDPivot

    So do you have a column in this table named "Keyword"??? If yes, you still need to add a search filter in Dynamic Views to catch the passed "Keyword" value from Dynamic Forms. Sounds like Dynamic Forms is doing everything it needs to pass this combo box value. However you may be having issues collecting this value in Dynamic Views. The name of the Dynamic Views Search filter(querystring collector) and name of the Querystring variable in the URL need to be exact in name syntax.

    Querystring Variable: Keyword
    DV Search Filter: Keyword

    This would be a match

    Querystring Variable: Keyword
    DV Search Filter: FirstName

    This wouldn't be a match and thus not collect appropriately.


    If this is not the issue you're encountering then my next guess is that you may need to update your query to:

    Select * from TempDUDPivot where ((club1='$(Keyword)' ) or ('$(Keyword)' = ''))

    I would recommend adding Debug=True to the URL to see under the hood of what Dynamic Views is attempting to execute.

    Let me know if you have any questions.

    Thanks,

    Ryan
    You are not authorized to post a reply.


     
     

    Join our mailing list...

    Get current news and events the easy way
    Subscribe Me

    Recent Blogs...

     
    Copyright 2005 - 2011 by Data Springs, Inc.
     
  • film izle
  • 720 izle
  • film
  • sinema izle
  • film makinesi
  • T�rk�e dublaj film
  • film izle
  • film izle
  • baglan film izle
  • sinema izle
  • 1080 film izle
  • film mercegi