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!

Blank value for search in SQL combobox
Last Post 02-02-2012 07:14 PM by Chad Nash. 2 Replies.
AddThis - Bookmarking and Sharing Button Printer Friendly
  •  
  •  
  •  
  •  
  •  
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages
marcvanzeeUser is Offline
wading in the water
wading in the water
Posts:24
Avatar

--
02-02-2012 12:11 AM
    I have three fields that are searchable:

    - Name (textfield)
    - Presence (combobox: Yes/No)
    - Room (combobox: Yes/No)

    Now I want to be able to search for Room=Yes with Presence=*, or for Presence=Yes and Room=*.

    I am aware that Dynamic Views currently does not support the OR condition, but I thought I might be able to achieve a similar result by adding a third option to the comboboxes: '---' with the value NULL using the following query:

    Select '---' as SearchOption, NULL as SearchOptionValue
    UNION Select 'Yes' as SearchOption, 'Yes' as SearchOptionValue
    UNION
    Select 'No' as SearchOption, 'No' as SearchOptionValue


    This is because the Dynamic Views documentation states the following:

    "Leaving the search criteria to be „equal‟ or „contains‟ will render results if the field is null or blank; by using this method you can have multiple fields such as zip code, city, and state, and allow the user to search based on only the fields that they enter search terms form"

    Therefore, I thought I simulate making a field blank by sending a NULL value to SQL. This does not seem to work for me, any other work arounds, or thoughts on this subject?

    Thanks,

    Marc.
    marcvanzeeUser is Offline
    wading in the water
    wading in the water
    Posts:24
    Avatar

    --
    02-02-2012 12:17 AM
    I fixed it. It works using the following setup:

    Input type = combobox
    Criteria = contains (equals does NOT work)
    Values = ,Yes,No (the first comma is necessary! it give a NULL value as the first option)

    Chad NashUser is Offline
    Posts:5260
    Avatar

    --
    02-02-2012 07:14 PM
    Hi Marc,

    Yes for any of these that you are trying to use with a blank value, I think you need to use either "CONTAINS" or sometimes "BEGINS WITH" or "ENDS WITH". Basically equals works because sometimes you want it to "Really" mean "EQUALS" such as showing you all results where the results are equal to null/empty etc...

    Thanks for the follow up post and details, this should be helpful to others!

    Thanks,

    Chad
    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