Newbie thread about global variables and result set

Hello everyone this is my first post, im from colombia and now im learning about this world !! the WCC !!
Now im doing a practice but im so noob that i cant get it so far... i wrote some of the oracle documentation.. and it was so usefull for starting.. but now im trying to do custom components builded in java + resources + services + template etcc .. all good stuff :D.
i want to retrieve a result set coming from a custom service ... and then i want to store this result set in some kind of global variable !! why ? because i want to use this data from the result set again and again without making more call to the service !!
ive tried to copy this resultset but i think it cant be done because i use a popUp window to display the rows from the RS.. and when i close the window .. it dies!!
i want to use this RS for 3 custom metadata field.. but i have no idea how to do this....
this is a part of my custom resource
<$if fieldName like "xElaborador"$>
<$executeService("SERVICE_ALLUSERS")$>
<$trace(" ### executing service ###","#log")$>
<!--i tried to copy the rs here but this is wrong i guess -->
<$nuevoRS="usuarios_LDAP"$>
<$endif$>
<!-- usuarios_LDAP is the RS parameter coming from the java calss -->
<$if rsExists("usuarios_LDAP")$>
<$if rsFirst("usuarios_LDAP")$>
<$loop usuarios_LDAP$>
<$trace(" ### inside RS ###","#log")$>
<$include each_user_LDAP$>
<$endloop$>
<$else$>
<$include therearenotusers$>
<$endif$>
<$endif$>
<!-- THIS CODE IS USELSS BASICALLY-->
<$if fieldName like "xRevisor"$>
<$if rsExists("nuevoRS")$>
<$if rsFirst("nuevoRS")$>
<$loop nuevoRS$>
<$trace(" ### inside rs for revisor ###","#log")$>
<$include each_user_LDAP$>
<$endloop$>
<$else$>
<$include therearenotusers$>
<$endif$>
<$endif$>
<$endif$>
pls tell me if im too lost im all ears to learn the good practices for this tool.

Hi ,
One of the good resource on this topic is :
http://jonathanhult.com/blog/2012/11/resultset-versus-dataresultset/
Thanks,
Srinath

Similar Messages

  • How do I store VI References in global variables and access them later

    From what I know, Labview automatically deletes VI references when they go out of use. Is there a way for me to override this so that I can access a set of preloaded references in a separate VI? Essentially I would like to open the VI's dynamically into the memory, store the references in global variables and access them at a later time. The VI's I'm referencing won't be known until runtime. I know its not the safest way to do it, but it would be the most productive on my end.
    Thank you
    Clay Upton

    I'm not sure what you mean by "a later time", but a VI reference will remain valid as long as the VI is in memory. If you don't unload the VIs, the references will remain valid.
    If you do need to unload the VIs, for whatever reason, I would suggest the following:
    Create a functional global as your interface for obtaining the references.
    Feed the paths to the VIs into the VI when initializing it (since you don't know which VIs in advance).
    When calling the VI to obtain the references, have the VI check them first (using the Not a Number... primitive). If it sees that they're invalid, it can open a new reference and return that.
    You should note that when a VI is removed from memory, the data space is used is released, so if those VIs are expected to hold data (using shift registers, etc.) this will be a problem.
    The description I've given will only be usable in certain instances (and it has its intricacies), but you didn't really give any details about what you're actually trying to accomplish.
    Try to take over the world!

  • Oracle Froms, Global Variables and Oracle Reports

    Hi all,
    We are developing a form that will call an Oracle report and we would like to test the value of a global variable that was set in the Oracle Forms in the "Before Parameter Form" in the Oracle report trigger. Can this be done?
    Thanks, Larry

    The "global" var. is global to either a report or a form, not both. You may pass them from one to the other but that's not the session-global thing.
    DC

  • What's the difference between global variables and instance variables?

    hi im just a biginner,
    but what is the difference between these two?
    both i declare them above the constructor right.
    and both can access by any method in the class but my teacher said
    global variables are not permitted in java....
    but i don't know what that means....and i got started to confuse these two types,,
    im confusing.......
    and why my teacher said declaring global variables is not permitted,,,,,,
    why.....

    instance variables are kindof like Global variables. I'm not surprised you are confused.
    The difference is not in how they are declared, but rather in how they are used.
    There are two different "styles" of programming
    - procedural programming.
    - object oriented programming.
    Global variables are a term from Procedural programming.
    In this style of programming, you have only one class, and one "main" procedure. You only create one instance of the class, and then "run" it.
    There is one thread of control, which goes through various methods/procedures to accomplish your task.
    In this style of programming instance variables ARE "global" variables. They are accessible to all methods. There is only one instance of the class, and thus only one instance of the variables.
    Global variables are "bad" BECAUSE you can change them in any method you like. Even from places that shouldn't have to. Also if you use the same name as a global variable and a local variable, you can cause great trouble. This can lead to very subtle bugs, as the procedures interact in ways you don't expect.
    The preferred method in procedural programming is to pass the values as parameters to the methods, and only refer to the parameters, and local variables. This means that you can track exactly what your method is doing, and what it affects. It makes it simpler to understand. If you use global variables in your methods, it becomes harder to understand.
    So when are instance variables not global variables?
    When you are actually using the class as an Object, rather than just a program to run. If you are creating multiple instances of an object, all with different values for their instance variables, then they are not global variables. For instance you declare a Person object with an attribute "firstname". Your "main" program then creates many instances of the Person object, each with their own "firstname"
    I guess at the end of all this, it comes down to definitions.
    Certainly you can write procedural code in java. You can treat your instance variables, for all intents and purposes like global variables.
    I can only think to show a sort of example
    public class Test1
       User[] users;
       public void printUsers(){
         // loop through and print all the users
         // uses a global variable
          for(int i=0; i<users.length; i++){
            users.printUser();
    public void printUsers(User[] users){
    // preferred method - pass it the info it needs to do the job
    for(int i=0; i<users.length; i++){
    users[i].printUser();
    public Test1(){
    User u1 = new User("Tom", 20);
    User u2 = new User("Dick", 42);
    User u3 = new User("Harry", 69);
    users = new User[3];
    users[0] = u1;
    users[1] = u2;
    users[2] = u3;
    printUsers();
    printUsers(users);
    public static void main(String[] args)
    new Test1();
    class User{
    String firstName;
    int age;
    public User(String name, int age){
    this.firstName = name;
    this.age = age;
    public void printUser(){
    // here they are used as instance variables and not global variables
    System.out.println(firstName + " Age: " + age);
    Shit thats a lot of typing, and I'm not even sure I've explained it any good.
    Hope you can make some sense out of this drivel.
    Cheers,
    evnafets

  • How can i find all global variable and parameters in a form?

    I don't know name of global variables and parameters,but i want get their name and value .
    how can i do? who can help me?
    Thank you.
    Daniel Liang
    2007.1.19

    no problem. As Francois said you can't do it programmatic in runtime.
    But when you use the debug-mode you can see each global with name and value.
    By the way: It's not good to not know all the globals in your application. This is one of the most important things you have to write down for your app. Create a wiki for such informations, so that all developer can share their information.

  • Declare global variable and retrive?

    Hi,
    we are working in live project in webtool, we wants to create global variable,
    calling that variable in a required pages, our questions is that where to declare global variable and how to declare in which page we have to declare?   pls guide us its very urgent and send the code.
    Regards
    Kannan.D
    Edited by: kannan desikan on Jan 14, 2008 8:07 AM

    Hi Kannan,
    I would suggest using a comma delimied list or putting it in the database.
    ArrayList myList = new ArrayList();
    myList.Add("one");
    myList.Add("two");
    myList.Add("three");
    string comma = "";
    // store the array in the session state
    foreach (string s in myList){
      Session["persistedArray"] += comma + s;
      comma = ",";
    To get the array back
    if (Session["persistedArray"] != null){
      ArrayList myList = Session["persistedArray"].ToString().Split(new char[1] {','});
    If your array is storing objects, you should use the database.

  • I was so excited about apple pay and now setting it up hoping to replace a wallet within next year or so and then boom 8 cards you are done! Come on Apple 8 cards is that what you call wallet replacement?

    I was so excited about apple pay and now setting it up and boom 8 cards and you are done is that the wallet replacement they thought they'll do? really? I mean most people have 10-15 cards at least and I am, well because of my side business I have lots so 8 is nothing to me!

    Not sure what you are saying.  I was able to very quickly set up my AmEx card - no problems at all.  For my PNC and Macy's cards, companies still working on being ApplePay-ready. 
    It will happen, just not as fast as we might like, but I think it is going to be fabulous. 

  • Query Performance and Result Set Query/Sub-Query

    Hi,
    I have an infoset with as many as <b>15 joins</b> with different ODS and Master Data..<b>The ODS are quite huge with 20 million, 160 million records)...</b>Its taking a lot of time even for a few days and need to get atleast 3 months data in a reasonable amount of time....
    Could anyone please tell me whether <b>Sub-Query or Result Set Query have to be written against the same InfoProvider</b> (Cube, Infoset, etc)...or they can be used in queries
    on different infoprovider...
    Please suggest...Thanks in Advance.
    Regards
    Anil

    Hi Bhanu,
    Needed some help defining the Precalculated Value Set as I wasnt succesful....
    Please suggest answers if possible for the questions below
    1) Can I use Filter Criteria for restricting the value set for the characteristic when I Define a Query on an ODS. When i tried this it gave me errors as below  ..
    "System error in program CL_RSR_REQUEST and form  EXECUTE_VTABLE:COB_PRO_GET_ALWAYS....                     Error when filling value set DELIVERY..                                               
    Job cancelled after system exception ERROR_MESSAGE"                                           
    2) Can I create a create a Value Set predefined on an Infoset -  Not Succesful as Infoset have names such as "InfosetName_F000232" and cannot find the characteristic in Paramter Tab for Value Set in Reprting Agent.
    3) How does the precalculated value Set variable help if I am not using any Filtering Criteria and is storing the List of all values for the Variable from the ODS which consists of 20 millio records.
    Thanks for your help.
    Kind Regards
    Anil

  • Question about shared variables and report generator

    I have a project with about 200-250 shared variables and at every 12 hours i want to make a report containing information about some boolean and double front panel variables linked to the shared variables... Now, i've tried with both the "Write Trace to SpreadSheet File" function from DSC->History and with different functions from NI Report Generation Toolkit. My problem is this: i would like to get my xls file to contain just the timestamps when my shared variable changed value. As it is, the number of rows in the file depends, obviously, on the sampling interval given as input. As an example, in 12 hours, my shared variable would change value maybe 5-6 times. Thus i would like my xls file to contain just 5-6 rows with those 5-6 changes. If i set the sampling interval to say, a matter of seconds, that would mean too much unneeded information in my xls file. Instead, if i set it to let's say 15 minutes, i would probably lose the moment the shared variable changed value. Is there a way for me to achieve my desired functionality with functions from DSC or Report Generation Toolkit? Thanks in advance, Sabin 

    Hi Mike and thanks for the reply. Actually, my first idea was exactly this: in an event case structure, whenever my variable changed value, i would retain the relevant data in an array and then at the 12 hour period write all of it in a report. However, my boss deeemed it memory unefficient and compelled me to use only one function. Thus my predicament... If you have more advice on this new info, i would be grateful... Cheers, sabin

  • Captivate 7 Help for creating Variables and Results

    Hi there,
    I'm currently trying to create a results page from the collection of the users selections in a survey that consists of radio buttons that would rate the users skills from 5 different levels starting from "unsatisfactory" to "Outstanding". What I want to do is after the users goes through about 45 selections, a results page will compile
    the Top 10 options that they have selected. Is this possible and how? Thanks in advance!
    I have about 5 different slides with a total of 45 various levels that I will be asking the user to rate themselves. Ultimately, on the last slide I want to compile the Top 10 results and possibly the bottom 5.
    Here are the screen shots of what I'm talking about
    Thanks in advance
    Peter

    Radio buttons widget or interaction has an associated variable, you'll have to use those variables and advanced actions.
    Widgets and Custom Questions - part 1 - Captivate blog  is an old blog post, that explains how to use the variable associated with the radiobuttons widget.
    What do you mean by Top 10?

  • Global variable and timer

    Hi,
    I have a really amazing problem. I have a form with a when-new-from-instance-trigger. In this trigger I create a timer. The timer reads some information and should pass them to a global variable. For testing my form I pass additionally the global variable value to a text object. After the timer I want to use the global variable value for a where condition in a sql statement. But I get always the no_data_found exception and the value of the global variable is empty! What happens with my value? Does anybody know about such a problem? Please help.
    Thanks Mandy

    My question is, why are you starting a timer from a When-new-form-instance trigger? If all you are doing in the when-timer-expired trigger is some SQL lookup, why don't you do it directly in the when-new-form-instance trigger?
    Timers, no matter how short a time span, do not expire (and run the when-timer-expired trigger) until everything else is done, and control switches to the user (form is ready to accept user input from mouse or keyboard). The only exception is in web forms where you start a timer with 0 (or maybe 1, I don't remember) millisecond -- in that case, Forms runs the when-timer-expired code immediately.

  • About global variables in forms personalization

    Hi all,
    I did forms personalzation based on global variables.
    When when i login for the first time untill and unless i validated the global variables the following error is displaying.
    Tokens in the string could not be evalated. please check the syntax.
    Once i validated the global variables then it will working fine.
    Did any of you have faced this problem please let me know the solution.
    Thanks and Regards
    Zaheer.
    Edited by: zaheer on Feb 5, 2010 1:23 AM
    Edited by: zaheer on Feb 5, 2010 1:24 AM

    Hi again;
    In addition to above please check:
    Form Personalizations in Oracle E-Business Suite (Release 12) [ID 395117.1]
    Information About the Oracle Applications Form Personalization Feature in 11i [ID 279034.1]
    Hope it helps
    Regard
    Helios

  • Question about session variables and binding

    Hi All,
    I'm a newbie with Application Express. I've gone through several tutorials and a book, and now I'm actually getting started with apex. My first adventure is a tiny little form, where all you do is fill it out and it sends an email. Pretty simple.
    And, i have it working just fine - but I have a question about something I don't quite understand. Basically, I am generating the email text in a page process. And some of the form fields work fine if i reference them as *:ACCT_NAME*, but some give me the dreaded "not all variables bound" error. For the ones that give me the error, I can reference them like V('ACCT_NAME').
    So, as a newbie, I'm a little confused. When is it appropriate to use the V function, and when it is appropriate to use binding? Why would one of the fields work with binding but not another from the same form?
    Thanks for any clarification you can offer,
    Lisa

    Lisa,
    A bind variable is a place holder variable available in an environment.It is used quite frequently(outside Apex Context) in SQL and PLSQL scripts and especially in Dynamic SQL statements.Many times using a bind variable gives better performance. In the Apex environment,page items and many other variables related to the session are available as bind variables and hence their value can be referred in SQL,PLSQL contexts as :VARIABLE_NAME.
    Now V() function is an apex specific function which returns the value of an apex session variable outside the apex environment. So as Machaan pointed out, it is used in
    procedures and triggers that gets called from within an apex session. This is required since the bind variables themselves are not directly available in the SQL environment but their values from the corresponding session can be accessed by this apex built-in function.
    The length of any Bind variable name is limited to 30 characters, this is a limitation inherited from Oracle SQL itself and hence session variables(page or application items) whose name has a length which exceeds 30 characters cannot be used as the :ITEM_NAME format. In such cases you would have to use the v() method again. This might be happening in your case.

  • Webdynpro - how to add global variables and common proj to existing proj

    How to add global variable in either ViewController or CustomController.  We realise that codes must be added within the begin and end exction.  Codes outside that will be deleted when saved. 
    How can we add a common WDP project to an existing project?  We have actually added a common wdp project at the project references screen.  But during runtime, we encouter error.  The error is classNotFoundException.  The class is the class created in the common project.

    Hi.
    I think you need to assign ProB to ProA.
    Step1.
    Open propety of ProjectA.
    Step2.
    Select WebDynproRefrences
    Step3.
    Select Sharing references
    Step4.
    Choose add button.
    Step5.
    If your projectA named "testapp" and you are not using
    DC "local/testapp" is the proper name.
    I hope that it work!!!.

  • Question about global variables in Netbeans 4.1's debugger

    so i can see the local variables, great.
    how do i display the global variables when im debugging? searched help, nothing, searched the netbeans site, nothing.
    anyone know?

    I haven't used the 4.1 version of the debugger (I can't get it to work on a single file/class) but under 3.6 you just put the cursor over them and the values is in the tooltip.

Maybe you are looking for