How can I pass Global Variable from Page1 to Page2

I have the following senario.
Pag1 - report is based on following PL\SQL
declare
g1 varchar2(100);
begin
g1 = select * from emp where dept = 10;
return g1;
end;
Now I have Page2 - based on following PL\SQL
declare
g2 varchar2(100);
begin
g2 := g1; -- here i want to use variable g1???
return g2;
end;
My question is - How can I use variable g1 from P1 in my new page P2.
Thanks,
Deepak

Hi Andy,
Thanks for the clarification.
I did exactly the same, created a new Region with HTML (PL\SQL) and got the output. it was fine.
Now when I am using exactly the same code in a Report (PL/SQL function returning a SQL Query), I am getting the following error.
DECLARE
g VARCHAR2(100);
BEGIN
g := 'This is a test string';
APEX_UTIL.SET_SESSION_STATE('G_SQL_STRING', g);
htp.p(v('G_SQL_STRING'));
END;
ERR-1002 Unable to find item ID for item "FLOW_SECURITY_GROUP_ID" in application "4000".
ERR-1002 Unable to find item ID for item "G_SQL_STRING" in application "4000".
I am doing the same thing, nothing changed....only difference is in 1st case I am using HTML (PL\SQL) Region and in 2nd case using the REPORT Region (PL/SQL function returning a SQL Query)
thanks,
deepak

Similar Messages

  • How can I pass a variable from Test Stand to CVI by reference

    Hi!
    I can't to pass numeric or boolean variable from Test Stand (for example: FileGlobals.StopFlag) into the step (CVI function).
    Function prototype: 
    void __declspec(dllexport) __cdecl PC2_WaitWhileResponceAppear(tTestData *testData, tTestError *testError, int *iStopFlag).
    When variable has bin changed I can't see this change from my function.
    CVI 2010, Test Stand 2010
    Can anybody help me?

    Hey Rombar,
    It is certainly possible to pass variables by reference; for example, if you go to <TestStand Directory>/Examples/Demo/C and open the computer.seq file, you can see one of the example sequences that uses CVI modules. If you click on one of these steps, you'll see that some of the parameters, such as the error information, is passed with pointers. This is a pass by reference.
    To help narrow this down, it'd be good for us to figure out a few things about how the code is run. First, if you go to Configure > Adapters, select the CVI adapter and choose Configure, you can see options for this adapter. Do you have it configured to run in an external instance of CVI or as an in-process call?
    Also, if you're wanting to see a change made in TestStand in your external code, this makes me think that you're wanting to run the code and then continue to execute your TestStand sequence while the code runs. How did you configure this behavior? For example, are you calling this code as a separate sequence in a new thread, or are you using another method to run this code while the sequence continues to run?
    Finally, if we could see a screenshot of how you're configuring the parameters on the TestStand step, that might be helpful as well.
    Daniel E.
    TestStand Product Support Engineer
    National Instruments

  • How can I handle global variables from different DLLs created based on VIs that access those variables

    My goal is to break apart an entirely LabView created application so I can still use parts of it (builded as Shared DLLs upon on some VIs) in my new .Net application. My problem is that some others VIs (that I am not intending using) are changing those global variables (in the natural data flow of the application).  I could , of course, send the values of those global variables as parameters, but I don't know how should I pass those data types (and their size)... There are some clusters there...
    Any help is well appreciated

    vulpe wrote:
    My goal is to break apart an
    entirely LabView created application so I can still use parts of it
    (builded as Shared DLLs upon on some VIs) in my new .Net application.
    My problem is that some others VIs (that I am not intending using) are
    changing those global variables (in the natural data flow of the
    application).  I could , of course, send the values of those
    global variables as parameters, but I don't know how should I pass
    those data types (and their size)... There are some clusters there...
    Any help is well appreciated
    Your
    problem is of course the use of globals. That is almost always a bad
    idea and asking for troubles once your application gets bigger.
    Avoiding race conditions and undesired influences between different
    parts of your application will take up more and more of your
    development time as your project grows.
    You should look into Functional Globals (LV2 style globals) and shift
    registers for data storage and queues for passing information between
    different parts of your applciation. Using these techniques
    consequently, will require you to spend some more time initially but
    will allow you to grow your application without increasing the
    complexity of managing such things exponentially.
    Rolf Kalbermatter
    Rolf Kalbermatter
    CIT Engineering Netherlands
    a division of Test & Measurement Solutions

  • How can I access global variables in a loaded Applescript?

    How can I access global variables in a loaded script, in Xcode, ApplescriptObjC? Basically, I have a global variable defined in my parent script using "property", and I need to modify objects connected to those variables inside of a loaded script.
    Example:
    Parent script:
    script AppDelegate
    property myTextField : missing value
    //linked to a text field object
    tell myScript to myAwesomeHandler_()
    end script
    Loaded script:
    on myAwesomeHandler_()
    myTextField's setStringValue_("The new Xcode is so glitchy ugh")
    //changes value of linked text field of parent script
    end myAwesomeHandler_
    The problem is, the variable is undefined in the Loaded script, and I need it to have the same value as the parent script, and I don't want to pass the variable through the Handler. Any ideas?

    I think want you are looking to do will need to be done in two steps. Because myTextField needs to be a property for the ObjectiveC part of the code you cannot turn it into a global.
    However if you make a temporary variable global assign the string to it in the handler then set myTextField off of it.
    global myTextFieldGlobal
    script AppDelegate 
    property myTextField : missing value 
    //linked to a text field object 
    tell myScript to myAwesomeHandler_() 
    myTextField's setStringValue_(myTextFieldGlobal)
    end script 
    on myAwesomeHandler_() 
    set myTextFieldGlobal to "The new Xcode is so glitchy ugh"
    //changes value of linked text field of parent script 
    end myAwesomeHandler_ 
    I know you stated you did not want the handler to return a value but I have to ask why? Global's, imo, are not a good idea and really should be used as a last resort.
    One other possibility is to pass a reference to the property to the handler. Not sure if that works in AS of if that would satisfy our requirement of not passing the variable through the handler
    <edit>
    Another though have you tried to define the property outside the script?  That is
    property myTextField : missing value
    script AppDelegate
    Not sure if that will work.
    You might also want to have a look at Scope of Properties and Variables Declared in a Script Object

  • How can i pass a variable instead of a table name in the Select statement.

    Dear all
    how can i pass a variable instead of a table name in a select statement ?
    Example :-
    Begin
    P_get_procedure_tname (aap_name,otable_name);--It will take an application name and will return a table name
    Select col1 into ocol1
    from  ---- here i want to pass the variable OTABLE_NAME
    End;How can i pass this ?

    Hi,
    You can use dynamic sql.
    EXECUTE IMMEDIATE 'SELECT COL1 INTO ' || OCOL1 || ' FROM " || OTABLE_NAME;
    {code}
    cheers
    VT                                                                                                                                                                                                                                                                                                   

  • How can I define global variable in user exit whic I can use anywhere.

    Hi all,
    How can I define global variable( Table ) which I can use when it come back to same user exit where I defined and stored some data.
    What I mean is I want to define 1 global table.
    In user exit when it comes I store some information. and again when it will come I will have that stored information so I can use it.
    Thanks a lot in advance.

    You can use EXPORT  TO MEMORY ID and IMPORT FROM MEMORY ID Statement for this.
    EXPORT T_ITAB FROM T_ITAB TO MEMORY ID 'ABC'.
    IMPORT T_ITAB TO T_ITAB FROM MEMORY ID 'ABC.'

  • How can I pass the photos from one iphone to another?

    how can I pass the photos from one iphone to another?

    Use the Beaming feature. See the info at the ? In iPhoto for iOS.

  • How can I pass environment variables to the child process?

    How can I pass environment variables to the child process? This is what I tried and it didn't work.
         static public void main (String[] args) throws Exception {
              ProcessBuilder b = new ProcessBuilder("java", "-cp", ".", "Child");
              Map<String, String> map = b.environment();
              map.put("custom.property", "my value");
                 b.redirectErrorStream(true);
              Process p = b.start();
              BufferedReader reader = new BufferedReader (new InputStreamReader(p.getInputStream()));
              String line = null;
              while (null != (line = reader.readLine())) {
                   System.out.println(line);
         public static void main(String[] args) {
              System.out.println("The value of custom.property is : " + System.getProperty("custom.property"));
         }and the result is:
    The value of custom.property is : null

    Complete test:
         static public void main (String[] args) throws Exception {
              ProcessBuilder b = new ProcessBuilder("java", "-Dcustom.property=my property value", "-cp", ".", "Child");
              Map<String, String> map = b.environment();
              map.put("custom.property", "my environment value");
                 b.redirectErrorStream(true);
              Process p = b.start();
              BufferedReader reader = new BufferedReader (new InputStreamReader(p.getInputStream()));
              String line = null;
              while (null != (line = reader.readLine())) {
                   System.out.println(line);
         public static void main(String[] args) {
              System.out.println("Property value of custom.property is : " + System.getProperty("custom.property"));
              System.out.println("Environment value of custom.property is : " + System.getenv("custom.property"));          
         }

  • How can I access JSP variables from a JavaScript function in a JSP page?

    Respected sir
    How can I access JSP variables from a JavaScript function in a JSP page?
    Thanx

    You may be get some help from the code below.
    <%
        String str="str";
    %>
    <script>
        function accessVar(){
           var varStr='<%=str%>';
           alert(varStr);// here will diplay 'str'
    </script>

  • How can i pass the music from my ipod touch to my mac

    how can i pass the music from my ipod touch to my mac

    If the music on the iPod was purchased through iTunes you can try Transfer Purchases.
    Connect the iPod to the Mac and launch iTunes. Right click on the iPod name on the left side of the iTunes window under the devices heading and select Transfer Purchases. That should transfer the music into the iTunes library on the Mac.
    iTunes Store: Transferring Purchases

  • How can I pass a variable between JSP and Role Form

    I need to pass a variable from (a copy of) applicationmodify.jsp to the IDM Role Form so that the variable is available within the Role Form at display. We've tried getAttribute and setAttribute modifying both the Role Form and the applicationmodify JSP and can get the form to the role form but not accessible but have had no other success. Has anyone had any success in doing this? Any suggestions would be appreciated.

    if by _root level you mean you're loading something into
    _level0 you can't won't be able to use the localconnection. the
    sharedobject is your only option.

  • How can i pass a variable's value from PR to PFR

    Dear all,
    hope you are fine.
    i would like to pass a variable's value from PR to PFR.
    how can i do that.
    please suggest.
    in PR:
    String transactionId = (String) vo_trans.first().getAttribute("Getnexttrans");
    i would like to get this value to PFR.

    Mofizur,
    You can achieve the same using Session variable.
    If u are not executing the VO after PR. Then you will be able to get the same value as u are using in PR
    String transactionId = (String) vo_trans.first().getAttribute("Getnexttrans");
    Note - You have a few of the threads left open, mark it as answered if solved.
    Regards,
    Gyan

  • How can I pass a variable  value from first jsp page to thired jsp page

    In my program ,threr are three jsp pages . I want the first pages's variable value in to thired page .How can I acess.
    I used the request.getparameter() ,but when I print the value , null value is getting .

    request parameters only last for one request.
    To save them longer than that you need to save them somewhere.
    Couple of alternatives
    1 - store them to session
    session.setAttribute("username", request.getParameter("username");
    2 - create a hidden field on page 2 and store the value from page 1 there. When you submit page2, you can get it on page3 with request.getParameter again.
    <input type="hidden" name="username" value="<%= request.getParameter("username") %>">

  • How do I pass a variable from edge animate to an external JS?

    I need to pass a variable value from Edge Animate to an external JS file. How can I do it?

    Not sure if this is the best way ,but works
    Set the variable as a property of a global variable
    Like
    SET
    window.myVar = 'your value';
    AdobeEdge.myVar = 'your value';
    Read
    window.myVar
    AdobeEdge.myVar

  • How to declare a global variable from a PL/SQL package

    Hi All,
    Using a global variable is a bad practise for all language. However, in my case, I have a PL/SQL package defines all constants, and I want to use them directly via SQL statement, for instance,
    PACKAGE my_const
    IS
         DEFAULT_ZIP_CODE CONSTANT VARCHAR2(5) := '00000';
    END;And I cannot referrence this variable from my select statement as
    SELECT my_const.DEFAULT_ZIP_CODE from dual;I have to create a function via my package, as,
    FUNCTION get_default_zip_code RETURN VARCHAR2
    IS
    BEGIN
         RETURN DEFAULT_ZIP_CODE;
    END;and
    SELECT my_const.get_default_zip_code from dual;I don't want to create functions to referrence the default varaibles. Does anyone have any clues?
    thanks
    Edited by: user4184769 on Jul 19, 2010 8:36 AM

    riedelme wrote:
    thanks for the info. Your scope explanation makes sense even though it is not intuitive to me. I think the usage of package variables should be supported by SQL (they're just values to be copied) Maybe look at it from another language's perspective. You want to use a global PL package variable in Java/C#/Delphi/VB/etc. How would you do it?
    None of these languages can crack open the data segment of a PL code unit, inspect the variables in it, and extract a value from it. Instead, it needs to be done as follows:
    Using sqlplus as the client illustrates how all these languages will need to do it:
    SQL> var value varchar2(20);
    SQL> begin
      2>     :value := SomePackage.someVar;
      3> end;
      4> /So why should SQL behave differently? It is not the same as the PL language. It is not a subset of the PL language. Yeah, PL/SQL blurs the line between these 2 languages making it very simple for us to mix their source code. But PL/SQL is SQL integrated with PL - not PL integrated with SQL. PL has tight hooks into SQL, creating cursors for you, defining bind variables, binding variables and doing the whole Oracle Call Interface bit for you.
    But SQL has no need for PL code, just as it has no need for Java code, or Delphi code or VB code. Yes, it is possible for it to call Java stored procs. As it is possible for it to call PL procs. But these are via the formal call interface of those languages - not via tight integration hooks that blur the languages and make SQL and Java, or SQL and PL, look like a single integrated source code unit.
    Thus SQL has the pretty much the same constraints in calling the PL language as other languages do. What SQL can do is use the PL engine's call interface and tell it "+execute this function and return the result of the function+".

Maybe you are looking for

  • Issue in import data from OIM to OIA

    Hi All, While importing entitlements from OIM to OIA ,we are getting following exceptions in OIA logs : 19:01:29,839 INFO [OIMDataProviderImpl] Start : Get Status of Data Collection ... 19:01:29,860 DEBUG[IamDataSyncMonitorImpl] OIMStatus FAILED 19:0

  • I downloaded a PDF file. How do I open my downloads?

    I can open most of my downloads, but I can't open a PDF file that I downloaded

  • Which one to use - Customer Interface or TCA APIs? And why?

    Hi, Please let me know the answer for the following questions. I have a legacy system in 11.0.3 (which does not have the TCA architecture) and the customers have to be moved to R12. I could get the details in different flat files for the import from

  • Multiprovider characteristics

    Hi, I would like to add characteristics in the structure of a multiprovider. The problem is that the characteristics that I would like to add are not characterics in the infocubes of the multiprovider, there are just navigational attributes of the ch

  • What is Mafiaa and how do I get rid of it?

    I seem to have acquired a Firefox addon called Mafiaa... redirector? I didn't ask for this, I don't know what it is and I want to delete it. Can you help please?