title: Global Variable - Oracle Form
body: <p>I am writing logic in custom.pll oracle forms. I want a global variable to capture value from one form and pass it to another form and execute the query. Below is the code</p>
  
  <pre><code>procedure event(event_name varchar2) is 
  form_name varchar2(50):= name_in('system.current_form'); 
    block_name varchar2(50):= name_in('system.cursor_block');
     v_group_name varchar2(255);
     V_GROUP VARCHAR2(255);
    begin
       if (event_name = 'ZOOM') then   
        if (form_name = 'FNDSCRSP' and block_name = 'RESPONSIBILITY') then 
          v_group_name:=Name_in('REQUEST_GROUP_NAME');
           fnd_function.execute(FUNCTION_NAME=&gt;'FND_FNDRSGRP',  
                               OPEN_FLAG=&gt;'Y',  
                               SESSION_FLAG=&gt;'Y'  
  
                             );
         IF(FORM_NAME='FNDRSGRP' AND BLOCK_NAME='GROUPS') THEN
          V_GROUP:=NAME_IN('REQUEST_GROUP_NAME');
          V_GROUP:=V_GROUP_NAME;
          EXECUTE_QUERY;
         END IF;
        END IF;
        END IF;
    end event; 
  </code></pre>