Announcement

Collapse

Mirth Connect 3.12.0 Released!

Mirth Connect 3.12.0 is now available as an appliance update and on our GitHub page. This release includes database performance improvements, improves visual HL7 representation, message pruning, keystore handling, PDF generation, community contributions, and fixes several security vulnerabilities. This release also contains many improvements to commercial extensions. See the release notes for the list of fixes and updates.

Download | See What's New | Upgrade Guide | Release Notes

For discussion on this release, see this thread.
See more
See less

Map variable not defined error

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Map variable not defined error

    I have a Javascript database writer destination defined as follows:

    var dbConn = DatabaseConnectionFactory.createDatabaseConnection ('net.sourceforge.jtds.jdbc.Driver','jdbc:jtds:sql server://sqlmonkey1:1433/Meditech','ppscript','pay4us');
    var result = dbConn.executeUpdate("INSERT IGNORE INTO CedaronBillingPat (ACCTNUMBER,RECORDSTATUS) VALUES ('" + $(anumber) + "','new')");

    dbConn.close();


    I get ReferenceError: "anumber" is not defined.

    I have an identical transformer on another destination using SQL which works fine. I assume that the statement is executing before $(anumber) receives it's value but can't figure out how to fix it. Please help!

  • #2
    Re:Map variable not defined error

    I think you have to put anumber between quotes
    It should be $('anumber')

    Comment


    • #3
      Re:Map variable not defined error

      That does work. Thank you very much!

      I was dragging and dropping the $(anumber) from the destination mappings and assumed it should work without intervention as it does when Use Javascript is No. Perhaps that should be a future enhancement.

      Comment


      • #4
        Re:Map variable not defined error

        Interesting...that's a bug. I will fix it for the next version. I wonder how no one has caught this until now.
        Brendan Haverlock | Mirth Software Engineer | Mirth Corporation

        Comment


        • #5
          Re:Map variable not defined error

          I have the same problem with version 1.6. With that version is solved?

          Comment


          • #6
            Re:Map variable not defined error

            It's fixed for 1.7, which will be out shortly.
            Jacob Brauer
            Director, Software Development
            NextGen Healthcare

            sigpic

            Comment


            • #7
              Re:Map variable not defined error

              Ok. Thanks.

              Comment

              Working...
              X