NebRef
river guide Posts:91
|
08-01-2012 06:27 AM |
|
I am generating a combo box in my Search Fields section using a list that I have created as you provided in your example. It works well but the problem is that I cannot create a blank entry in the dropdown list so that the user can opt out of searching that field (leave it blank) if they wish to do so. However, I note that in the dropdown lists that I have used in my Dynamic Registration Form for the State and Country fields, there is a blank at the top of the list. How was this done?
I know I can't create a blank in my List and the Country and State listings in Host > Lists don't have a blank line in them either.
Thanks for the help.
Jim
|
|
|
|
|
Ryan Bakerink
river guide Posts:1900
|
08-01-2012 08:57 AM |
|
Hello Jim, Perhaps you could use the SQL UNION ALL keyword? Try this: Select '' As SearchOption, '-1' As SearchOptionValue UNION ALL Select Text As SearchOption, Value As SearchOptionValue from Lists where listname = 'Region' and ParentID = 221 This would be a list of states. So try placing this SQL statement for a Search Field. Let me know if you have any questions. Thanks, Ryan
|
|
|
|
|
NebRef
river guide Posts:91
|
08-03-2012 12:39 PM |
|
Ryan: This worked very well. Thanks for the help. However, when I use this function, although the search results return correctly, I get the message "Your search returned a total of 0 records." It will then produce all of the results correctly. Thoughts? Thanks!!! Jim |
|
|
|
|
Ryan Bakerink
river guide Posts:1900
|
08-04-2012 05:13 AM |
|
Hello Jim, You're probably not using Allow Free Form, so use this query: Select '' As SearchOption, '' As SearchOptionValue UNION ALL Select Text As SearchOption, Value As SearchOptionValue from Lists where listname = 'Region' and ParentID = 221 The only difference is that the SearchOption now = '' instead of '-1' Let me know if this helps. Thanks, Ryan
|
|
|
|
|
NebRef
river guide Posts:91
|
08-07-2012 11:03 AM |
|
Ryan: I still get that the following message: "Your search returned a total of 0 records. You are currently viewing records 1 thru 50 and are on page 1 of a total of 6 pages." Interestingly enough, I created a new page and used the SearchAllField for a standard textbox search (without using a SQLquery for my input values) and get the same result. The search produces all of the correct results but shows a return of "0 records." Might this be a glitch in the SearchAllField option or is it something in my database? Thanks for the help. Jim |
|
|
|
|
Ryan Bakerink
river guide Posts:1900
|
08-08-2012 06:39 AM |
|
Hello Jim, Are you using Dynamic Views 3.0.1? This version should have resolved this issue that you're encountering. Let me know the version you're on. Thanks, Ryan |
|
|
|
|
NebRef
river guide Posts:91
|
08-08-2012 06:43 AM |
|
Ryan: Sorry about the confusion. This is in DUD (4.10.3.10911) - not Dynamic Views. I realize I'm in the wrong Forum. Thanks, Jim |
|
|
|
|
Ryan Bakerink
river guide Posts:1900
|
08-08-2012 06:48 AM |
|
Hello Jim, You're not going to be able to accomplish this with DUD. You if this functionality is mandatory then I would recommend using Dynamic Views. Let me know if you have any questions. Thanks, Ryan |
|
|
|
|
NebRef
river guide Posts:91
|
08-08-2012 06:53 AM |
|
Ryan: What you gave me actually works in DUD very well. The only issue I'm having is that the returned records number is "0" as opposed to the number of records actually returned. . Everything else works great. I REALLY appreciate the help. Jim |
|
|
|
|
Ryan Bakerink
river guide Posts:1900
|
08-08-2012 07:01 AM |
|
Hello Jim, The Results counter was an issue in Dynamic Views until the latest patch became available. My guess is that this same bug exists in DUD but hasn't been fixed yet. So for the time being you may want to hide the results count by disabling the "Display number of records to user." this should be under Module Configuration -> Search I know a newer version of DUD will be released very soon, so you may have to avoid using this feature until the newer version is available. Let me know if you have any questions. Thanks, Ryan |
|
|
|
|
NebRef
river guide Posts:91
|
08-08-2012 07:44 AM |
|
Thanks!!! Jim |
|
|
|
|