Cfreturn variable is not recognized when outputing content

I have a page that i wish to display total invoices paid to a particular contractor. This Page is Runnign CF9. I'm using a CFC page to write my queries and a action page to display the output via a search box from a search page. Whenever i input the invoice id, coldfusion throws the error: Variable RECENT_INVOICE is undefined"  Am i missing something? my syntax is written below:
<!---CFC PAGE--->
<cfcomponent>
<cffunction name="getinvoice" access="public" returntype="query">
<cfquery name="recent_invoice" datasource="w9">
SELECT invoice.*, project.*, bid.*, CONCAT(w9.w9fname,' ', w9.w9lname,'  ', w9.w9businessname) AS Contractor, w9.*
FROM invoice, project, bid, w9
WHERE invid = #form.invid#
AND INVOICE.invcontractor = W9.w9ID
AND INVOICE.invproject = PROJECT.proID
AND INVOICE.invproject = BID.bidproject
AND INVOICE.invcontractor = BID.bidcontractor
</cfquery>
<cfreturn recent_invoice>
    </cffunction>
</cfcomponent>
<!---Display page that show the invoked query--->
<cfinvoke
  component="invoice.componets.test"
  method="getinvoice"
  returnvariable="recent_invoice">
<!--- CFC Query --->
</cfinvoke>
<!---OUTPUT Items Below--->
<cfoutput>#recent_invoice.invdate# - #recent_invoice.invjob1# - #recent_invoice.invamt1#</cfoutput>

Looks like you are referencing a form field in your query; form.invid.  You are not submitting a form, you are calling a cfc so you probably want to add an argument to your function and pass the value when you call it.  Change like so:
<!---CFC PAGE--->
<cfcomponent>
<cffunction name="getinvoice" access="public" returntype="query">
<cfargument name="invid" type="numeric" required="true" />
<cfquery name="recent_invoice" datasource="w9">
SELECT invoice.*, project.*, bid.*, CONCAT(w9.w9fname,' ', w9.w9lname,'  ', w9.w9businessname) AS Contractor, w9.*
FROM invoice, project, bid, w9
WHERE invid = <cfqueryparam cfsqltype="cf_sql_integer" value="#arguments.invid#" />
AND INVOICE.invcontractor = W9.w9ID
AND INVOICE.invproject = PROJECT.proID
AND INVOICE.invproject = BID.bidproject
AND INVOICE.invcontractor = BID.bidcontractor
</cfquery>
<cfreturn recent_invoice>
</cffunction>
</cfcomponent>
<!---Display page that show the invoked query--->
<cfinvoke
  component="invoice.componets.test"
  method="getinvoice"
  invid="#yourInvoiceNumber#"
  returnvariable="recent_invoice">
<!--- CFC Query --->
</cfinvoke>

Similar Messages

  • Disabled ipod not recognized when plugged back in to itunes.

    Daughter's disabled ipod (second time) is not recognized when we follow instructions to enable it and plug into itunes.

    HT1808 is the article you need to follow. You need the section labeled "Placing the device into recovery mode."
    You need to power the device off. Once the device is off press and hold the Home button or the button on the front of the device and while holding the Home button plug in the device and continue holding the home button until you see the image below.

  • HT4528 My Apple ID or password is not recognized when I tried to download an app. I reset my password but it still did not work. My id and password worked fine on this website.

    My Apple id and password is not recognized when I tried to download an app. I reset my password but it still did not recognize it. This website recognized it.

    Did you go to Settings>iTunes and App Stores and sign out and sign back in?

  • [SOLVED]Hard Disk not recognized when installing

    Hey all, I'm just starting with Arch and I've had some trouble installing it on my Acer netbook.
    My first installation went well except that I had forgot to download the wireless tools so I decided to do a fresh install as I had no access to a wired connection at the time.  The second installation attempt must have had some error on my part as Arch failed to start after selecting it from Grub, saying that the kernel was not available/not recognized.
    Now my subsequent attempts at installing have failed because the hard disk is not recognized when running either cgdisk or cfdisk.  Instead of showing my hard drive partitions after running
    cfdisk /dev/sda
    it shows my usb drive. If I instead use
    cgdisk /dev/sda
    it displays an error saying that the disk is damaged or not recognized.  When I first saw this I thought my disk was failing, so I tried #! to see if it would show the same error, but it was able to recognize the entire disk and install correctly.  Now, even after having the entire disk formatted as ext4 with #! installed, cgdisk is still giving me the same error about a damaged disk.
    Am I doing something incorrectly or is there a fix for this?  I haven't been able to find any information about this after a good while of searching.
    Thanks for your help.
    Last edited by Forest_Leaves (2013-03-05 08:30:24)

    srs5694 wrote:The cgdisk "damaged disk" error is probably a result of the tool seeing an MBR partition table on your USB flash drive, rather than the GPT disk it's expecting. If I'm right, you should not follow s1ln7m4s7r's advice, since that will simply trash your USB flash drive!
    If you mean by trashing the USB flash drive, that it will delete all data and partitions on the selected drive it is correct, because:
    dd if=/dev/zero of=/dev/$disk bs=4096 count=1
    - this will delete all partition-table data
    sgdisk -o /dev/$disk
    - this will clear out all data. This includes GPT header data, all partition definitions, and the protective MBR.
    /dev/$disk
    - this will make you enter ncurses-based GUID partition table (GPT) manipulator, where you can create new partitions
    You should only do this if you are certain of what disk it is.
    Now if when you said this, you were meaning it will became broken, then it may be a special kind of usb drive because i've donne it many times and i've not broken any.
    srs5694 wrote:My guess is that either your hard disk has become /dev/sdb (this can happen in some cases; disk identifiers aren't really fixed) or you're missing a driver for your hard disk controller because you've booted a different kernel or a different initrd file. Another possibility is that there's a hardware fault -- probably a loose cable -- that's preventing the kernel from seeing the disk.
    If the usb drive is not where you installed arch, then you need to find if there are more recognized drives:
    lsblk | grep disk
    And see the uuid of the root partition you want, and add it to your bootloader boot line:
    blkid /dev/sdxx
    Last edited by s1ln7m4s7r (2013-03-04 19:17:36)

  • Serial number not recognized when I update lightrrom

    serial number not recognized when I update lightrrom

    More specifics might be helpful, but try this info site
    Lightroom and Creative Cloud FAQ

  • I'm getting a message "USB Device Not Recognized" when I try to sync my iPad.  What should I do?

    I'm getting a message "USB Device Not Recognized" when I try to sync my iPad.  What do I do?

    Is the iPod Touch specifically stated as being compatible?  Have you tried to perfrom a hard reset of the iPod with it still connected?  To do this, press and hold both the Sleep/Wake and Home buttons together long enough for the Apple logo to appear.
    B-rock

  • I have downloaded Flash and it says sucessful install and yet is not recognized when I go to YouTube

    I have downloaded Flash and it says sucessful install and yet is not recognized when I go to YouTube

    Flash Player Help | Installation problems | Mac OS
    Flash Player Help | Installation problems | Flash Player | Windows
    Mylenium

  • Shared Variable does not update when typedef is changed

    I have a shared variable of type custom control (typedef made up of a cluster). When I chang the typedef, e.g. the name or type of one of the fields in the cluster, and then save it, the shared variable does not update to reflect this change. That is, if I place the shared variable on my block diagram and do a "UNBUNDLE BY NAME" on the output, I see the old fields. I have to go back to the properties of the shared variable, change its data type, apply it, then go back and change it back to my custom control.
    Anyone else seen this behaviour? Anyone know how to get the shared variable to update without going through this procedure?
    Bill
    “A child of five could understand this. Send someone to fetch a child of five.”
    ― Groucho Marx

    I guess I should have included this information:
    LabVIEW 8.2.1 using Project Explorer.
    “A child of five could understand this. Send someone to fetch a child of five.”
    ― Groucho Marx

  • Term is not recognized when executing PowerShell Script through SQL Agent using CMDEXEC

    I am trying to simply execute a PowerShell script that is stored in a file on a network drive through SQL Agent as a job. The script is a basic copy from one directory to another.  I have run and successfully executed this from a command prompt outside
    of SQL Agent.  When I execute this through SQL Agent as a Operating System (CmdExec) command I am getting an error that the term is not recognized as the name of a cmdleet, function, script file or operable program. I have executed many different ways
    put found an article to use double quotes in the network path which I have done with no success. 
    I am executing the following command as a job in SQL Agent:
    PowerShell H:\"\PowerShell""\PS_Scripts\"\batchcopyFFLWithProgress.ps1 through SQL Agent job
    I get the following error message:
     04/21/2015 10:01:09,Copy FFL Files,Error,1,NY11266-LTW7E\JPLAPTOPSQL,Copy FFL Files,Copy FFL files,,Executed as user: NT Service\SQLAgent$JPLAPTOPSQL. H:\PowerShell\PS_Scripts\batchcopyFFLWithProgress.ps1 : The term   'H:\PowerShell\PS_Scripts\batchcopyFFLWithProgress.ps1'
    is not recognized as   the name of a cmdlet<c/> function<c/> script file<c/> or operable program. Check the   spelling of the name<c/> or if a path was included<c/> verify that the path is   correct and try again.
     At line:1 char:1  + H:"\PowerShell\PS_Scripts"\batchcopyFFLWithProgress.ps1  + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~      + CategoryInfo          : ObjectNotFound:
    (H:\PowerShell\P...ithProgress.p      s1:String) []<c/> CommandNotFoundException      + FullyQualifiedErrorId : CommandNotFoundException.  Process Exit Code 1.  The step failed.,00:00:03,0,0,,,,0
    Content of batchcopyFFLWithProgress.ps1 which has the PowerShell script:
    $source=ls H:\SQLTest\Script\TestData\*.*
    $i=1
    $source| %{
        [int]$percent = $i / $source.count * 100
        Write-Progress -Activity "Copying ... ($percent %)" -status $_ -PercentComplete $percent -verbose
        copy $_.fullName -Destination H:\test -Recurse
        $i++
    I have searched the internet and have not found any resolution to my error.  If someone has experienced this error and found the resolution I would greatly appreciate your help.

    I have change the service account for SQL Agent to be my domain account as I have local admin rights to my laptop.  I stopped and started the services for SQL Agent and than started the job to run which is copying locally to minimize any network drive
    issues.  I am still getting the same error message as it is showing that I am executing the job under my domain account?  Any thoughts what it could be?
    ErrorMsg
    04/23/2015 11:21:06,Copy FFL Files,Error,1,ServerName\InstanceName,Copy FFL Files,Copy FFL files,,Executed as user: Domain\DomainAccount. \\ServerName\Test\PS_Script\batchcopyFFLWithProgress.ps1 : The term '\\ServerName\Test\PS_Script\batchcopyFFLWithProgress.ps1'
    is   not recognized as the name of a cmdlet<c/> function<c/> script file<c/> or operable program. Check the spelling of the name<c/> or if a path was   included<c/> verify that the path is correct and try again.  At
    line:1 char:1  + \\ServerName\Test\PS_Script\batchcopyFFLWithProgress.ps1  + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~      + CategoryInfo          : ObjectNotFound: (\\ServerName...ithProgress.ps1:String)
    []<c/> CommandNotFoundException      + FullyQualifiedErrorId : CommandNotFoundException.  Process Exit Code 1.  The step failed.,00:00:02,0,0,,,,0
    Script
    $source=ls "\\ServerName\Test\TestData\*.*"
    $i=1
    $source| %{
        [int]$percent = $i / $source.count * 100
        Write-Progress -Activity "Copying ... ($percent %)" -status $_ -PercentComplete $percent -verbose
        copy $_.fullName -Destination "\\ServerName\Test\test" -Recurse
        $i++

  • IPhone 4 not recognized when connected to new USB 2.0 card

    I have an iphone 4 OS4.1 on a no-name Windows XP Pro (service pack 3) PC with an AMD processor and lots of RAM.
    I had the phone working and syncing beautifully with the onboard USB 1.1 but it was slow. So I bought a new PCI USB 2.0 card and installed it. Card is installed and there are no problems according to the status in System Devices.
    But the computer does not recognize the iphone when plugged into one of those ports. If I plug it into one of the USB 1.1 ports that are still in the machine, it syncs and works fine. If I plug it into one of the new USB 2.0 ports, the PC shows the window at bottom right saying the device is not recognized. Tried the wizard but it's useless.
    THOUGHTS?????

    Nevermind!!!
    It turned out to be a faulty cable! I tried it with a different sync cable and it works fine!
    So disregard the question above.

  • IPod 4 gen, not recognized when lugged to laptop

    I got and iPod from my son who wiped it, and when I connect it to my laptop(s), I get this message, "USB device not recognized, one or more USB devices has malfunctioned. Any ideas how to fix this?
    I had this happen before with my Nano, and found a solution here. I don't see the solution iFound the last time.

    See
    iOS: Device not recognized in iTunes for Windows
    - I would start with
    Removing and Reinstalling iTunes, QuickTime, and other software components for Windows XP
    or              
    Removing and reinstalling iTunes and other software components for Windows Vista, Windows 7, or Windows 8
    However, after your remove the Apple software components also remove the iCloud Control Panel via Windows Programs and Features app in the Window Control Panel. Then reinstall all the Apple software components
    - New cable and different USB port
    - Run this and see if the results help with determine the cause
    iTunes for Windows: Device Sync Tests
    Also see:
    iPod not recognised by windows iTunes
    Troubleshooting issues with iTunes for Windows updates
    - Try on another computer to help determine if computer or iPod problem

  • "USB device not recognized" when ipod plugged in???

    (ipod mini 4gb)
    When I plug my ipod into my laptop I get the message: "USB device not recognized." It says the device has malfunctioned!!! If I click on this error message it says my ipod is an unknown device and no drivers are installed for it???
    It was working fine until a few days ago. If i reset it I can charge it up but that's all, it still does not appear in itunes or on my computer.
    I've tried eveything on the help website but nothing works! Can anyone help?!
    patriot 3050   Windows XP  

    ok my question is do you have a mac or windows based laptop
    here is why and what happened to my ipod mini
    my ipod mini was connected to my macintosh charging while i was using my imac and it came up with a system update 10.4.3 i installed it and finished installing it and afterwards my apple wouldn't recongnize my ipod mini or even display it one the screen i found out by myself that when the apple update got to the end of the update it installed new hard drive drivers but also installed the drivers on the ipod mini which locked out the mini's internal hard drive and my mini then stop responding it would play music and charge but wouldn't connect to the computer
    so what i did to fix it was this
    i went into utilites in mac os x tiger or any version of os x has this and selected disk utility you will notice that the ipod will appesr in disk utility but not on the desktop this is due to a recent system update driver that isn't compatible with the internal drive on the ipod mini so in disk utility just select format the drive in a mac os partition standard works the best it will then format the ipod and the ipod will apear in the desktop again but not as a ipod let me explain when you format the ipod using the disk utility it formats and even erases the firmware of of the hard drive on the mini so when you are done formating the ipod run the ipod updater to reinstall the ipod's operating system and presto your ipod will now work again
    warning: i don't know how to fix this on a ipod in windows so if this is a windows based laptop you need to find someone witha macintosh to do this with sorry

  • "USB Device not Recognized" when shuffle is plugged into computer

    Everytime I plug my shuffle into my Dell laptop it comes up with the message "USB device not recognized". The shuffle doesn't show up in my computer or itunes. I've done some of things that it says to try, but I'd really like to get this fixed and get my shuffle working. Typically when I plug it in, it blinks once, yellow/orange, and then no more, and the notice comes up on the computer screen. If this makes a difference, the shuffle worked fine until last summer when my hard drive crashed. Upon installing a new hard drive, the shuffle began to not work/sync with my computer as it had been before. Any suggestions on how to get my shuffle working again? Much appreciated!

    Well start with these articles and see if that gets you anywhere...
    iPod is not recognized properly by computer when USB drivers are not installed properly or are out of date
    http://docs.info.apple.com/article.html?artnum=305136
    iTunes for Windows: iTunes 7 doesn't recognize iPod
    http://docs.info.apple.com/article.html?artnum=304434
    iPod missing in "My Computer" or in iTunes for Windows
    http://docs.info.apple.com/article.html?artnum=61711
    Also you might try forcing the iPod into disk mode first, then connecting it to your computer and see if that makes it show up in iTunes...
    Putting iPod into Disk Mode
    http://docs.info.apple.com/article.html?artnum=93651
    Perhaps the iPod Shuffle utility might help?
    http://docs.info.apple.com/article.html?artnum=305204
    Patrick

  • Computer says usb/device not recognized when plugged in??

    When I plug in my sons ipod nano 7th generation, just recently says usb/device not recognized and doesn't light up when plugged into the wall either??? Any suggestions??

    This came from another thread, but worked for me.  Problem is with newest iTunes 4.62.  Unistall iTunes, as well as its helper programs (Apple Application Support, Apple Mobile Divice Support, and Apple Software Update).  Reboot, and reinstall iTunes.  It will reinstall all the other ones and you should be able to connect your nano.  Good luck.

  • Ipod not recognized when using an external hardrive, please help me!

    I have a 4 gig ipod mini, I have been using it for over a year with no problems. recently, my computer will not recognize my ipod when it is plugged in with my external hardrive. I have chosen to keep all of my music on a 100 gig external hardrive, because I have a lot of it. when I plug my ipod into my computer and run Itunes my computer will recognize my ipod, open itunes and then the program will freeze. i can also plug in my external hardrive and when i do my ipod is not recognized by the computer at all. I have tried, numerous scans of both hardrives, multiple updates, new USB cords, I have the most current version of itunes and yet I come to see no results, if you know anything please help me, I don't know what else to do.

    http://docs.info.apple.com/article.html?artnum=93499

Maybe you are looking for