Adding an if / missing peramiters in the cfswitch to a query statement

Hello;

I am trying to add a function to a page I made. There a lot of things, so I'll try and give you the basic function I am trying to add... and as few of the other logic as possible.

I want to add a drop down menu on this page, I have 2 querys by running. one, running the drop... Here's the code for that:

< name CFQUERY = "cata" datasource = "" #APPLICATION.dataSource # "cachedwithin =" #CreateTimeSpan (0, 6, 0, 0) # ">"
Select subName, subID
OF merchSubCat
ORDER BY subName
< / CFQUERY >

< form Name = 'box' method = "get" Action = "wallProduct.cfm? id = #subID #" >
< select name = "CategoryID" size = "1" class = "selectstyle" onChange = "category.submit (); ">
< option value = "" >--select a category--< / option >
< request CFOUTPUT = "cata" >
< option value = "#subID #" > #subName # < / option >
< / CFOUTPUT >
< / select > < / make >

OK, pretty simple. He takes the news of my db and makes a small menu out of it. Click on one of the selections, and it'll pass a url.id on the same page. This complaint is the main, that runs the page. I need to serve the first Recordset by default, and if you select in the dropdown menu, the records according to will be brough. Here's my query to add this feature.

< name cfquery = "getMerch" datasource = "#APPLICATION.dataSource #" >
MerchID SELECT, MerchName, MerchDescription, MerchPrice, MYFile, subID, CategoryID
OF goods
WHERE
< cfif isDefined ("#url.id #") >
< cfswitch expression = "#url.id #" >
< cfcase value = "1" > subID = 1 < / cfcase >
< cfcase value = "2" > subID = 2 < / cfcase >
< cfcase value = "3" > subID = 3 < / cfcase >
< / cfswitch >
< cfelse >
subID = 1
< / cfif >

< / cfquery >

When loading my page, there is no ID in the url, and my code is not like that and throwing an error as such:

Item ID is not defined in the URL.

The error occurred in C:\Websites\187914kg3\magWall\wallProduct.cfm: line 19
17 : FROM Merchandise
18 : WHERE
19 : <cfif isDefined ("#url.id#")>
20 : <cfswitch expression="#url.id#">
21 : <cfcase value="1">subID = 1</cfcase>


That's my problem, and I'm sure it's something stupid, that I forget ehre. I did this b4. How to make it work so that by default, subID = 1 appears when the page loads, and the others are displayed when you use the menu drop down.

I also talked to the other logic on this page. There is a following n button to perform this query, but also a cfswitch to invert the order of the folders, using ORDERBY in my query. But I want to get this dropdown menu to operate before adding it to this logic.

can someone help me? I have a mental block about this problem.

Thank you.

Well that really doesn't change anything.  You mix a few variables scope limited with unscoped variables earlier.  I would have just added the expanses of original code.

Speaking as to the 89 line which is a table cell (which you have...).  How did the error line related to the request code and form that you posted?

Tags: ColdFusion

Similar Questions

  • FixIt 50229 fails to correct the missing icons in the sector of plateau running w7x64 & IE9

    Missing icons in the tray area, IE without the "arrow" to go to the page of the game icon and other action center cannot access as the arrow is missing. Have run the FixIt 50229 trying to correct it but that too fails.

    [Moved]

    Hello

    You did changes to the computer before the show?

    Method 1:
    You can try the following steps and check.
    a. Right-click on the taskbar and click Properties.
    b. Click on the Area of Notification tab.
    c. Check (on) or disable (off) the options you want or do not want to display on the Taskbar Notification area.

    Method 2:
    Try these steps and check.
    a. right click on a zone empty of the taskbar.
    b. tab select properties then taskbar.
    c. press the button customize section Notification area.

    Method 3:
    If the fix that it does not help then try the steps in knowledge base article and check.
    System icons do not appear in the notification area in Windows Vista or Windows 7, you must restart the computer

    http://support.Microsoft.com/kb/945011
    Note: This section, method, or task contains steps that tell you how to modify the registry. However, serious problems can occur if you modify the registry incorrectly. Therefore, make sure that you proceed with caution. For added protection, back up the registry before you edit it. Then you can restore the registry if a problem occurs. For more information about how to back up and restore the registry in Windows:
    http://support.Microsoft.com/kb/322756

  • one of the icons at the top of my software is missing.   I have those for: open the safe, files, print, share files, customize, reminder, BUT THE ONE for SOULIGNANT A WORD or EXPRESSION IS MISSING, then delete the page, etc.  I have Acrobat Pro 10.  How c

    one of the icons at the top of my software is missing.   I have those for: open the safe, files, print, share files, customize, reminder, BUT THE ONE for SOULIGNANT A WORD or EXPRESSION IS MISSING, then delete the page, etc.  I have Acrobat Pro 10.  How to get back the icon and the missing function?  I would just reinstall, but I get the message that I don't have a legal copy of the program.  However, I bought and paid for it.  Thank you very much for your help!  Carolyn

    Add them to your quick tools. Go help > Quick of the tool.

    I've added these tools to my quick tools, as follows:

    Also see this article: Adobe Acrobat X Pro * databases the workspace

  • View missed calls when the phone is off?

    Hello

    My phone turned off (or without service) incoming calls do not show on my list of missed calls.

    There may be a voicemail when my phone is back, but no match no missed calls.

    Is there a setting that will show you missed calls when the phone is off?

    Debra

    iPhone 6 s

    Once you turn back on your iPhone, all calls that occurred while the iPhone was off should appear in the Missed Call list.

    If they do not:

    • If you are in your area served by your cellular operator, contact your operator.
    • If you are outside this area (roaming), you can not see the calls until the return.  You could ask your cellular operator on this subject.
  • missing text in the button Delete the bookmark.

    There is missing text in the button Delete the bookmark. The key works but the text is missing.

    Here is a screenshot of the problem:
    http://Tinypic.com/view.php?pic=dltkau & s = 8 #. U0rV96KrFEM

    Start Firefox in Safe Mode to check if one of the extensions (Firefox/tools > Modules > Extensions) or if hardware acceleration is the cause of the problem (switch to the DEFAULT theme: Firefox/tools > Modules > appearance).

    • Do NOT click on the reset button on the startup window Mode without failure.
  • Found 0 results for my browser missing important elements, the menu..., whole tool bar drop down to print, copy, work offline, file, save, bookmarks, history. I just installed latest foxfire on windows xp. Found a few instructions, but they called in the

    Found 0 results for my browser missing important elements, the menu..., whole tool bar drop down to print, copy, work offline, file, save, bookmarks, history. I just installed latest foxfire on windows xp. Found a few instructions, but they called the keys of my computer does not have (key under OSX there no file, edit, history, help, tools, navigation, all the things that your directions say to use. Also, I'm still hanging and the message a scrip is running. I don't know what are the thises scripts but I of course don't need them.

    This has happened

    Each time Firefox opened

    == I just noticed it. It probably happened when I upgraded foxfire.

    Don't see the menu bar not (File, Edit, View, history, Favorites, tools, help)?
    Turn on/off the menu bar is a new feature in version 3.6.
    (Linux and OSX see: what happened to the file, edit and view menus? )
    Windows Method 1. Press and hold the key and press the letters of the following in this exact order: V T M
    Windows method 2 Press and release the button. The Menu bar is displayed; then choose ~ ~ red: V ~ ~ iew > ~ ~ red: T ~ ~ oolbars and click on ~ ~ Red: M ~ ~ enu Bar.
    The menu bar should now be displayed permanently, unless you turn it off again using view > toolbars. Check = not displayed, NO check mark is not displayed.
    See: http://support.mozilla.com/en-US/kb/Menu+bar+is+missing

    Navigation, bar toolbar bookmarks and other toolbars under view > toolbars. By clicking on one of them will place a check mark (display) or remove the check mark (not shown).

    To display the status bar, view, and then click status bar to place a check mark (display) or remove the check mark (not shown).

    Mode full screen
    http://KB.mozillazine.org/netbooks#Full_screen

    See also:
    Back and front toolbar buttons or others are missing
    Customize controls, buttons, and Firefox toolbars

  • Satellite L750-1LC - Boot Manager is missing by using the recovery disk

    I bought a Toshiba satellite L750-1LC and I try to create the DVD 4 to save.

    On the first dvd that only he came an error reading twice, the other DVDs were ok.
    When I try to recover from the DVD the recovery process got stuck on the first dvd so I had to reboot and try again, but the same thing happened to it.

    After you restart the system it came a message that bootmnager is missing and windows and any other thing was gone.

    Is the promotion of "No. Matter What Guarantee" "covering this type of flaws?
    If so, what are the steps to qualify for this promotion?

    I said that I am a Romanian citizen and I have already implemented for promotion in the specified time interval.

    It seems that the first recovery disk is not created properly because you got an error message.
    As I understand your message, you have tried to boot from the first recovery disc (which was not correctly created in the past) and so the installation could not be completed successfully.

    Now, you cannot start the operating system, because the Boot Manager is missing and possibly the system is deleted also
    I see just one solution: order the new disk recovery from here and use it for the installation of the OS: http://backupmedia.toshiba.eu/landing.aspx

    PS: as far as I know that hardware issues are covered by the warranty, software issues not covered by the warranty

  • Vibe X 3 Low Vibration, missing most of the reviews?

    Hi all

    I'm using this device more than 10 days and felt its Vibration is also much slower than any samsung and another phone while it is in my Pocket I missed most of the important alerts, etc., only get appeal warns when received a call because rintone plays at very high volume, which is a good thng...

    Im having always have to keep iphone4S with miss no alert, if it can be fixed then I'll getrid of keep two phone in the Pocket.

    However this bug has been fixed in update of Marshmallow, please upgrade your operating system if you are on lolipop yet...

  • Missing Launchpad from the dock. How to restore?

    Missing Launchpad from the dock. How to restore?

    The Finder, choose Applications go to menu and get her back.

    (137799)

  • missing samples in the waveform graph

    Hello world

    When processing a file .wav into pieces, I noticed that there are missing samples on the waveform graph where two pieces must be met for the display. What could be the cause of this? Any help appreciated. Thank you!

    Milan

    Your method of reading in pieces in a for loop is create a table 1 d of waveforms with the tunnels of automatic indexation.  It is as well as what you have the data appear in different plots.  I don't know if that's what you want.

    But if this is the case, the problem is that you get to the last point of the first plot, and the first point of the next parcel is a different value.  Because they are two different plots that you do not get the line to join them, as you do between points that are part of the same plot.

  • Missing VI on the new laptop

    When I tried to open the vi in a new laptop, it will signal missing vi as the attached screenshot.

    It seems of NIscope, so I installed and try again, but still the same.

    I use LV2009, suggestions, thank you.

    Instead of trying to copy the files from niScope, I think install would be better.

    You probably have the drivers on DVD, or you can download them from the Web site of NOR: http://joule.ni.com/nidu/cds/view/p/id/1492/lang/en

  • How can I re - install Windows XP on my daughters PC where the product key is missing half on the sticker?

    Hello
    I have the original from my window xp I want to put it on my lap top girls but the number of product is half missing, is in the same House since when I recorded my own can I put it on more tham 1 pc in the same household?  If so, how can I get the number, when I ring to activate, it is for me as a no, I may have a pirate copy, but it's mine
    Thanks in advance
    original title: activating xp

    If your copy of Windows is preinstalled on a computer, it's an OEM copy - and the license CANNOT be transferred to another computer.

    Nobody don't keep records of this license has been actviated by which - above all, Microsoft. Data for registration and Activation are stored on separate servers and correlate precisely for this reason.

    Each license of the retail XP DO can be installed that on one machine at a time - the OEM licenses are not transferable between machines.

  • Option missing Scan from the control panel for my Officeject HP 8600 pro. How can I get that back?

    I have this printer for a few months now - it works well until today.  Option missing Scan from the control panel for my Officeject HP 8600 pro.

    I have Windows 7

    Access has been-

    Beginning

    Devices & Printers

    HP Officejet 8600

    He opens a box that had a detection option (later), which I clicked to bring up the scan dialog box.

    The option disappeared. I have no idea how it happened.

    How can I get that back?

    1. first of all uninstall the software

    • Click on start button, then go to programs > HP > Officejet 8600 and click on Uninstall.

    2. then go to Control Panel > programs and features

    • Officejet 8600-click and then click on uninstall a program

    3. then download the software on the HP web:

    4 and install with the downloaded software.

    Hope these steps help you,

    * Click the stars KUDOS to say thanks

    * Click the accepted Solution if the answer to the question.

  • My icons on my desktop are missing and in the start menu, my files are missing (ie itunes) as "internet explore runs without any add ons.

    Last night my computer says something about a hard drive failure

    Hi Jazmin123,

    1. you remember to make changes to the computer, after which the issue started?

    2 are all the desktop icons and lack of start menu?

    3. what version of Internet Explorer is installed on the computer?

    4. do you see iTunes under installed programs? You are able to open iTunes in the program files directory navigation?

    Try the following steps:

    Step 1:

    Due to Internet Explorer, take a look at the link to the following article:

    Internet Explorer 8 will start in "no Add-ons" mode when you use the desktop icon to start Internet Explorer

    Internet Explorer Add-ons: frequently asked questions (Applicable to Windows XP)

    Step 2:

    If all the desktop icons are missing then try the steps from the following article link and check if that helps:

    Your desktop icons are missing in Windows XP

    I hope this helps. Can't wait to hear back on your part.

  • missing events in the event log

    I'm really new and can't help otherwise explain what just happened to me. I am running Vista home and checked my reliability and performance monitor. He came back to me with missing events to the event log. 14% of my missing log files. He told me that my buffer size and maximum ETW memory buffer is not obtimal that the data sets are collected. I have AVG free virus and found no problem. I had a lot of problems with the security of the networks and curious to know for myself if someone takes information just behind my computer. Everyone acts as if I am perinoid, but I had log events while at work and shut down the system. Some are could not log on to attemtps still more successful. Many programs also show other computers on my network even glancing only ethernet to my dsl modem. So I'm not under xp but have the same diagnostic report. I would be grateful no sign, that I am not paranoid. thanx

    Hi Dancin' madman,

    Welcome to the Microsoft Vista answers Forum!

    I would like to ask you a few questions in order to get a better understanding of this issue so that we can better help you.

    (a) what version of Vista are you using?

    (b) is connected to a domain, or more than 10 computers in your computer network?

    (c) what the event log you are trying to check?

    For example, if you check the log of events for an Application, then you must

    1. click on Start, type Event Viewer in the start search and press enter

    2. in the Windows logs , select the Application, it should be under the winlogon (the last)entry. Right click on the Application and select Properties.

    3. in the Properties , you can check for the latest event logs and check the settings if it is set to replace the events, if you want, then you can change the settings.

    Because you are worried about the security of the network, you can try first run a scan of online security.

    Follow the below links for analysis online on your computer to verify if there is a malicious software on your computer.

    http://OneCare.live.com/site/en-us/default.htm

    http://www.Microsoft.com/security/malwareremove/default.aspx

    You can also check if the Services of Windows Event log and dependence are started.

    1. Click Start, type Services in start search box and press ENTER.

    2. Locate the Windows event log in the mentioned Services.

    3. check if the status is started. If the condition column is blank, right click on the Windows event log Service and select start.

    4. open the Windows Service event log, select dependencies. In dependencies, select the Windows event collector and click ok to start the service.

    5. also check the dependencies in the Windows event collector and launch service dependencies by clicking OK.

    Hope the helps of information.
    Please post back and we do know.

    Concerning
    Jeremy K
    Microsoft Answers Support Engineer
    Visit our Microsoft answers feedback Forum and let us know what you think.

Maybe you are looking for