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 Drop Down from SQL Query
Last Post 05-24-2012 07:20 PM by Ryan Bakerink. 7 Replies.
AddThis - Bookmarking and Sharing Button Printer Friendly
  •  
  •  
  •  
  •  
  •  
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages
HeatherUser is Offline
wading in the water
wading in the water
Posts:17
Avatar

--
05-18-2012 05:33 AM
    Hi there,

    On my form I have a drop down thats SQL driven, I am using the query of SELECT DISTINCT(EmployeeName) FROM User_Access_Request_Form.  In my drop down I do see the field is getting something back from the query but its not visible on the form only a bunch of blank lines that do match the entries in the table.

    Is there another query that I need to add to this one to make the data visible?  I read something of cast and convert but not sure how to add those into my query string.

    Thanks,
    Heather
    HeatherUser is Offline
    wading in the water
    wading in the water
    Posts:17
    Avatar

    --
    05-18-2012 06:07 AM
    I have tried all variations of these and still the dropdown retuns with blank lines...

    SELECT DISTINCT CAST (EmployeeName AS CHAR(500)) FROM User_Access_Request_Form
    SELECT DISTINCT CAST (EmployeeName AS NCHAR(500)) FROM User_Access_Request_Form
    SELECT DISTINCT CAST (EmployeeName AS VARCHAR(500)) FROM User_Access_Request_Form
    SELECT DISTINCT CAST (EmployeeName AS NVARCHAR(500)) FROM User_Access_Request_Form


    In my table its listed as NVARCHAR(500)
    Ryan BakerinkUser is Offline
    river guide
    river guide
    Posts:1900
    Avatar

    --
    05-18-2012 08:33 AM
    Hello Heather,

    When using SQL Driven options within a Combo Box you must return two columns of data named QuestionOption and QuestionOptionValue.

    For instance, try this query:

    SELECT DISTINCT CAST (EmployeeName AS CHAR(500)) As QuestionOption, CAST (EmployeeName AS CHAR(500)) As QuestionOptionValue FROM User_Access_Request_Form

    This query should work as long as you don't have any SQL Syntax Errors, which I don't see. However I have no way to know if the table name is correct "User_Access_Request_Form ". So make sure that you're referencing the correct table.

    Thanks,

    Ryan
    HeatherUser is Offline
    wading in the water
    wading in the water
    Posts:17
    Avatar

    --
    05-21-2012 05:02 AM
    Hi Ryan,

    Thank you! That worked adding those column names in my query, now I can see the entries for that column in my drop down. 

    When I select that drop down I have configured a events to trigger the fields on my page to populate with information relating to that user from my table.  I'm using the following format in my SQL driven field to populate my Employment Type field, not sure if its correct:

    SELECT EmployType AS QuestionOptionValue, EmployType AS QuestionOption FROM User_Access_Request_Form Where EmployeeName = '()'

    It looks like the form is trying to process something but nothing is populating on the field.

    Should I be using this command in both the Question Events and the Advanced Field Options?

    Thanks,
    Heather
    HeatherUser is Offline
    wading in the water
    wading in the water
    Posts:17
    Avatar

    --
    05-21-2012 05:50 AM
    I have changed my sql query and I can see the results when I test this in SQL Host but nothing is populating in the field for the results.

    SELECT EmployeeName AS QuestionOptionValue, FullPart AS QuestionOption FROM User_Access_Request_Form
    Ryan BakerinkUser is Offline
    river guide
    river guide
    Posts:1900
    Avatar

    --
    05-22-2012 10:38 AM
    If you're using Question Events on the page then you must add an additional Question Event that sets a default value on the field that the SQL Query is Dynamic to.

    SO if you have a hidden field named EmployeeName, you will need to use the same SQL Default query in a question event to set this value again. After a Question Event post back is initiated these values can be lost.

    Please let me know if you have any questions.

    Thanks,

    Ryan

    HeatherUser is Offline
    wading in the water
    wading in the water
    Posts:17
    Avatar

    --
    05-22-2012 10:54 AM
    Hi Ryan,

    This form will have a comboBox to allow HR to choose an EmployeeName, onmce a name is chosen all the other fields should populate with the information for that employee that was last entered into table at an earlier time. Again, these fields will be setup as labels, or is that not going to work for this?

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

    --
    05-24-2012 07:20 PM
    Hello Heather,

    You're going to need to create multiple Question Events that set a default value on the fields based on the EmployeeName selected value.

    So for each field that is needed to display to show information based on the selected employeeName there will need to be a corresponding question event.

    Please let me know if this makes sense or 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