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!

Retrieving the States of a Country from DNN Lists
Last Post 08-26-2009 07:28 AM by David To. 3 Replies.
AddThis - Bookmarking and Sharing Button Printer Friendly
  •  
  •  
  •  
  •  
  •  
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages
vr1001 vr1001User is Offline
river guide
river guide
Posts:115
Avatar

--
08-24-2009 01:12 PM

    Hi,

    Based on David's message I was able to populate a State field using the DNN Region list

     

    Select '-Select State-' as QuestionOption, '-1' as QuestionOptionValue
    Union All
    select Text as QuestionOption, Text as QuestionOptionValue from Lists where ListName= 'Region' AND ParentID = 221

    We could do this because David told us 221 is the Id for USA.

    I would like to know IDs for Canada and Mexico please

    Also this raises another question. If ParentID is expecting such numeric values, how will the following statement will work

    David ToUser is Offline
    river guide
    river guide
    Posts:2719
    Avatar

    --
    08-24-2009 01:37 PM
    You can find it out youself as well. Just go to HOST / SQL and type in:

    select listname,value,text,parentid from lists where listname in ('Country','Region')
    order by listname,text,parentid

    -- David
    vr1001 vr1001User is Offline
    river guide
    river guide
    Posts:115
    Avatar

    --
    08-26-2009 06:57 AM

    Hi David,

    I really appreciate your VERY prompt answers. Thank you!

    I am able to get the desired results using your tips.

    But... I want these results dyna,ically based on the selected "Country" rather than hard coding the country code.

     

    Ideally, I willhave just ONE State field (combobox) whose entries should be populated based on the selection made in the "Country" combobox. {just like DNN Country, Region List]

    All the examples given on this site (more specifically those given in Demo 11) use a variable in the WHERE clause like:

    select text as questionoption,value as questionoptionvalue from Lists where listname = 'Region' and ParentID = '$(mycountry)'

    [where MyCountry is the short name for the Country Combobox]

    Since that is NOT working in my case, I am forced to create THREE comboxes - one each for USA State, Canada Province, and Mexico State. Using Question events, I am showing teh relevant State List based on the Country selected. Within each State list combobox, I am using hard coded SQL like:

    select text as questionoption,value as questionoptionvalue from Lists where listname = 'Region' and ParentID = 221

    And finally, I created a 'hiddenState' and writing the selected State from each of the three State comboboxes. This will contain the "latest selection' from any of the three State lists.

    To avoid these work-arounds' I really appreciate if you can point me to a page that gives details on how to use a "variable" in the WHERE Clause for ParentID.

    Thanks a lot in advance!

    VJ

     

    David ToUser is Offline
    river guide
    river guide
    Posts:2719
    Avatar

    --
    08-26-2009 07:28 AM
    Your token value should work. What you need to do is this:
    Leave your Country field the way you have it now. But for your State Field, under Advanced Options, make it "Hide until forced visible by question event". Use the same exact SQL query you had above.
    Under question events, create an event to unhide the State based on any response from the Country field. Try this out and see if it works for you. The trick is you need to set up a question event to trigger a postback and unhide the State field. -David
    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