web stats
Problems with variables - Mirth Community

Go Back   Mirth Community > Mirth Connect > Support

Reply
 
Thread Tools Display Modes
  #1  
Old 09-26-2006, 01:28 AM
fernandoma fernandoma is offline
What's HL7?
 
Join Date: Sep 2006
Posts: 3
fernandoma
Default Problems with variables

Hello, I have the next code inside the filter:
{
var pac_nombre = "PEPE";
globalMap.put('pac_nombre',pac_nombre);

return true;
}


And inside the transformer in the mapping section:
globalMap.get('pac_nombre')

The output field is return:
org.mozilla.javascript.NativeJavaObject@998c5d



If I put localMap the variable return null.

Can you help me?
Reply With Quote
  #2  
Old 09-26-2006, 12:36 PM
chrisl chrisl is offline
Mirth Employee
 
Join Date: Aug 2006
Posts: 967
chrisl is an unknown quantity at this point
Default Re: Problems with variables

1. Try var pac_nombre = 'PEPE'; instead (with single quotes).
2. Also you can use globalMap.get('pac_nombre').toString(); in the transformer
3. The localMap from the filter does not get carried over to the transformer. Ideally, all variable mappings occur in the transformer.

Hope this helps!
-Chris
__________________
Chris Lang
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Mapping variables from preprocessor skrugg Support 3 05-27-2014 12:03 AM
Alert Template Variables tsmith Development 1 05-01-2008 03:41 PM
Global Variables gauchomike Support 2 02-19-2008 10:31 AM
SQL Variables not showing under Available Variables in 1.4 bobbie Support 4 04-23-2007 06:35 PM
More variables fernandoma Support 1 09-26-2006 12:31 PM


All times are GMT -8. The time now is 02:46 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2019, vBulletin Solutions, Inc.
Mirth Corporation