Topic
4 replies Latest Post - ‏2013-02-19T16:21:11Z by SystemAdmin
SystemAdmin
SystemAdmin
1192 Posts
ACCEPTED ANSWER

Pinned topic macro global variable.

‏2013-02-19T13:31:41Z |
Hi All,

In macro creation the extracted date is stored in one global variable.is it possible to show the entire extracted data in transformation jsp.

please assist me.

Thanks,
-Venkat
Updated on 2013-02-19T16:21:11Z at 2013-02-19T16:21:11Z by SystemAdmin
  • P8GM_alejandro_amen
    P8GM_alejandro_amen
    34 Posts
    ACCEPTED ANSWER

    Re: macro global variable.

    ‏2013-02-19T14:26:25Z  in response to SystemAdmin
    Hi,

    Try this code in your jsp

    
    <%= ((TransformInfo)request.getAttribute(CommonConstants.REQ_TRANSFORMINFO)).getGlobalVariable(
    "gvname", 
    
    true).getString(0) %>
    


    replace gvname with yours.
    • SystemAdmin
      SystemAdmin
      1192 Posts
      ACCEPTED ANSWER

      Re: macro global variable.

      ‏2013-02-19T15:51:19Z  in response to P8GM_alejandro_amen
      many thanks for your reply;

      if we created the global variable in the ".event" file, the code snippet is correct as well as its work.but i want macro variable data. if am wrong please correct me.
      Thanks,
      -Venkat
      • tmparker
        tmparker
        484 Posts
        ACCEPTED ANSWER

        Re: macro global variable.

        ‏2013-02-19T16:06:14Z  in response to SystemAdmin
        Your question does not make sense. You said that you extracted data to a global variable in a macro. If that is the case then the code snippet can be used to display that data in a transformation. However, now you are talking about macro variables which are not the same as global variables. Macro variables only exist inside the macro while its running. You can't access it from a transformation since they no longer exist. That is why you would use global variables.

        Thanks
        Tim