Mirth Community

Mirth Community (http://www.mirthcorp.com/community/forums/index.php)
-   Support (http://www.mirthcorp.com/community/forums/forumdisplay.php?f=6)
-   -   Problems with variables (http://www.mirthcorp.com/community/forums/showthread.php?t=423)

fernandoma 09-26-2006 12:28 AM

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?

chrisl 09-26-2006 11:36 AM

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


All times are GMT -8. The time now is 03:47 PM.

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