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

Variables not recognized in DBwriter destination

  • Filter
  • Time
  • Show
Clear All
new posts

  • Variables not recognized in DBwriter destination

    I have a channel set up which listens for responses on a channel reader and writes to a database. Problem is, I'm trying to match up the message ID in the response message to the database, and I can't get the variable to pass into the destination database writer.
    It throws this error:

    org.mozilla.javascript.EcmaError: ReferenceError: "messageId" is not defined.

    I've called the variable everywhere and everyway I can think of, even in the destination. It won't see them. What am I doing wrong?

    var dbConn = DatabaseConnectionFactory.createDatabaseConnection('org.postgresql.Driver','server','user','pword');
    dbConn.executeUpdate(("update adt_50_msg set status = 'Successful ACK' where message_id like "«»)+$(messageId));
    Thanks for any help!

    Post edited by: r_kerry, at: 11/20/2007 12:48

  • #2
    Re:Variables not recognized in DBwriter destination

    I think you need single quotes around messageId.

    Reid Hospital and Healthcare


    • #3
      Re:Variables not recognized in DBwriter destinatio

      That appears to have been the problem, however, it might be worthwhile to note that I dragged that variable from the list at the right... So this could be a confusing point for other less experienced JS coders like myself in the future...

      Thanks for the help!!