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

Set channel variable

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

  • Set channel variable

    I have a channel variable that isn't set to anything. I would like to set that variable with the outcome of some javascript code. How can I set that variable?


    $('sPID') = myPID[0];

    This is the error I'm getting:
    Code:
    ERROR 2008-02-18 11:21:43,400 [1390cd96-39fe-4baa-bb55-5c55ad1391bf_destination_1_connector.dispatcher.1] org.mule.impl.DefaultComponentExceptionStrategy: Caught exception in Exception Strategy for: 8b524474-8c02-486c-b5b5-fe041d2908ba: org.mule.umo.transformer.TransformerException: 
    CHANNEL:	GRV3 -- Patient Database
    CONNECTOR:	Destination 1
    SCRIPT SOURCE:	
    LINE NUMBER:	29
    DETAILS:	ReferenceError: Function 
    function $(string) {
        if (connectorMap.containsKey(string)) {
            return connectorMap.get(string);
        } else {
            if (channelMap.containsKey(string)) {
                return channelMap.get(string);
            } else {
                if (globalMap.containsKey(string)) {
                    return globalMap.get(string);
                } else {
                    return "";
                }
            }
        }
    }
     can not be used as the left-hand side of assignment or as an operand of ++ or -- operator. (com.webreach.mirth.server.MirthJavascriptTransformerException)
    Post edited by: afterdark23, at: 02/18/2008 11:50
    Reid Hospital and Healthcare

  • #2
    Re:Set channel variable

    Nevermind. I was able to find the answer. :blink:

    Code:
    channelMap.put('sPID',myPID[0].toString());
    Reid Hospital and Healthcare

    Comment

    Working...
    X