Luke Goodale
wading in the water Posts:20
|
08-14-2006 09:52 AM |
|
Recently I have been attempting to use the SQL driven options on the dynamic forms module. Every time I save and attempt to view my handiwork, the combo box is not populated with any data. I have tested the query with the "test SQL" button and the database returns several rows which fill the listbox is with greyed out items. I then click update field and then update settings. Upon viewing the form however, the combo box is empty. Did I do something wrong? This is my query:
SELECT SerialNumberBoard AS QuestionOption FROM QcdMaster.dbo.TraceBoard WHERE SerialNumberBoard LIKE '11%0%S'
I have also tested this query on the SQL query analyzer and I can assure you that it works correctly. Thanks in advance.
|
|
|
|
|
Chad Nash Posts:5260
|
08-14-2006 11:44 AM |
|
Hi. With version 2.0 of Dynamic Forms the sql syntax has changed to allow for Option Text and Option Value fields. For example (California as the text but CA as the value).
Example: select Text as QuestionOption, Text as QuestionOptionValue from Lists where ListName= 'Country' Order By TEXT ASC
Example 2 (yours): SELECT SerialNumberBoard AS QuestionOption FROM QcdMaster.dbo.TraceBoard, SerialNumberBoard AS QuestionOptionValue FROM QcdMaster.dbo.TraceBoard WHERE SerialNumberBoard LIKE '11%0%S'
Let me know if this works.
-Chad |
|
|
|
|
Luke Goodale
wading in the water Posts:20
|
08-14-2006 12:22 PM |
|
Well that was a good idea (and will be useful in the future), but unfortunately, it did not work. Here is the new query:
SELECT TOP 5 SerialNumberBoard AS QuestionOption, SerialNumberBoard AS QuestionOptionValue FROM QcdMaster.dbo.TraceBoard
I also tried reversing the order that the text and value fields are returned in, to no avail. I am open to any other suggestions. Thanks in advance.
|
|
|
|
|
Chad Nash Posts:5260
|
08-14-2006 02:16 PM |
|
Luke,
I did find an issue just sent you an attached patch. Let me know if this fixed your issue and I will get it posted.
-Chad
|
|
|
|
|
Luke Goodale
wading in the water Posts:20
|
08-14-2006 02:33 PM |
|
Yes, the patch did seem to solve the problem. I havent done any rigorous testing however. As a sidenote, the combo box sends its data to the querystring when saving, however, it doesn't retrieve data from the querystring (automatically select the item that corresponds to the querystring entered). I don't know if this was originally the functionality intended, but I thought I should point it out. I would also like to thank you for your prompt service.
|
|
|
|
|