Global Varaibles

Hi there -
just a simple Question - but I'm stuck on it...
I recorded a script and edited it to my belongings...
Put some Functions and Subs in it to have better Code-Format...
Also i want to add some Global Variables that have to be avaiable in most of the Subs
Now where have I to Define those Varibles ???
In VB / VBA it has to be defined in the Head of the Module but i dont have such in VBS ???
So where must i put the declarations ?

Hi Thomas,
this question has me interested. In the WWW I found the following page:
http://technet.microsoft.com/en-gb/library/ee176978.aspx 
On this page I seek then to "global".
Regards,
ScriptMan

Similar Messages

  • Access on global varaibles

    hi , i am using hyperion 9.3.1 ,
    i have a global variable which is a saved selection varaible hence only admin can change that varaible
    now this variable is to be changed while running the script so i have made it run time prompt , but this provides every other user to change the value of this variable while running the HBR , but only a selected set of users are the ones who need to change the variable while executing the HBR for the rest of the users the value should be default value.
    i want to know if we can provide only a selected set of users with the access to change the value of the run time prompt global varaible.
    thanks in advance

    Hello Ray,
    1)
    I had two string arrays with: array1[0....11][0...800], array2[0...6][0.....400]
    until this everything was ok
    then I increased the array1 to array1[0....11][0...1200]
    from this point I had the problem
    2)
    No the subsequences are in the same sequence file
    3)
    I am using teststand 3.1
    would it be better for this probelm to use teststand 3.5?
    Thank You for your help
    regards
    Samuel

  • How to setup global varaible?

    Hi,there,
              Does jsp application support global varaible? like
              global.asa in ASP and Application.cfm in ColdFusion?
              Or I have to setup session varaible?
              I use Weblogic5.1/SP3
              Tks
              

    Yoo wrote:
              >
              > Hi,there,
              > Does jsp application support global varaible? like
              > global.asa in ASP and Application.cfm in ColdFusion?
              The counterpart of global.asa or so is JSP's "application" explicit
              object. The object is of javax.servlet.ServletContext type and I suggest
              your reading of Java API to gain more knowledge about it. Another way
              would be to take a look at JSP Specification 1.1 -
              http://java.sun.com/products/jsp
              So, you can programmatically add some variables to make them global
              (application.putAttribute()) or use web.xml file and add necessary
              <context-param>'s.
              > Tks
              Jacek Laskowski
              HP Consulting
              

  • Global Varaible in script

    Hi All,
    I am not able access  a variable in one widow with another window. What i am doing is i am declaring and assigning value to a variable in one window but printing in next window, the the value is not getting printed.
    So. how can i declare a global variable in script?
    by
    SAPPIEN

    hi sappin,
    can u declare the variable in main window.
    bcz mainwindow is continuoous so it's print the variable. when ever u call this variable into another page.
    then it's printed.
    regarding,
    kartik.

  • Global Variable in Essbase unable to pull up dimension structure

    Hi!
    I have created a global variable in Essbase using which I want to select a dimension member in a Business rule. While trying to create the global variable in Essbase though, I cannot pull up the dimension structure in the Limits or Default value fields to view them. So even if I leave them blank and validate the business rule that uses this global variable, and if I try to select a member from the dimension that this variable references, I get this error "Null child not allowed".
    In the global variable settings, even if I type in a value manually in the default value field and use this global variable in a business rule, I get the same error.
    This global variable itself can pull up the structure of other dimensions. It is only this one dimension that is giving me trouble. Do I have to make any dimension setting changes? I have checked the settings/security and they seem to be identical to the other dimensions that work fine.
    This is the 9.3.1. world and I am doing these changes in the EAS console client (not the web version).
    Any pointers will be appreciated.
    Thanks!
    NJ

    It looks like global variable cannot handle a hierarchy that is about 1800 members strong directly under the root. So I had to move the members under a 'dummy' rollup member under the root and now the business rule can bring up the hierarchy wrt the global varaible.

  • Scope of global & pl/sql variable in open_form with new session

    Hi,
    What will be the scope of the Oracle forms global variable & variable declared in a pl/sql pckage, if the value in these variable is updated from the Oracle Form GUI, if the form is opend by using the open_form method with new session or Active session.
    My requirement is , I developed one application with custom user login name & password - not the Oracle username & password.
    But I need to track the user actions on the forms - Inser/Update/Delete action, for this i included user_name as one of the column in the base table, and from the form, initialise this field with login user name.
    I implemented this in the trigger of the base table. But for delete, I am not getting the user name who deleted, only getting the user who created this record, because :NEW is not in scope for after delete trigger. So for the delte, I created a variabe in a PL/SQL package, and created two procedure to set & get the user name to that variable, and from the Form, before delete by using the set method I assign the current login user name to the variable, and in the trigger by using the get() get the user name from the variable, So far this is working fine, my doubt is What will be the value in the variable, if two different user made delete action from at a same time, Whether first user name will be replace with second one, or this variable will be in different session, If I opened the forms by using SESSION parameter. Also can I use Oralce Forms global varaible instead of the PL/SQL varibale.
    Thank in advance.

    Thanks Andreas,
    I did the same way. But my doubt is All the user login will be in different session, I mean, Whether the vairable used to store the user name will be in different session to each Oracle Forms user, it wont overwrite one user name with the next login user name.
    -- Copied from you old message:
    <<On the forms-side after the login, call PK_USER.PR_SET_USER(THE_USER_TAKEN_FROM_SOMEWHERE);
    In your db-triggers where you actually use something like USER, use PK_USER.FK_GET_USER instead>>
    Thanks
    Rizly

  • Assign to a globa variable value from html variable.

    I need to assign to a global varaible say pkg1.var1 a value from the form.varaible.value
    how can it be done.
    The code looks like
    htp.p('<form name="f_a" method="get" >');
    htp.p( 'Your ref. nr.: ');
    htp.p('<input type="text" name="f_var1" maxlength="25" onChange="alert(''Your new reference num is ''+f_a.f_var1.value);" value="'||r_offerte.cusrefnur||'">');
    pkg.var1:='f_a.f_var1.value';
    htp.p('</form>');
    This code does not work and the value assigned is null;
    Thanks in advance.

    Hi,
    this forum is about Oracle Forms. maybe you try this in the database forum or Portal.
    Frank

  • How  Hash tables can be used  in PI mapping

    Hi Experts,
    I'm don't have any idea how we store the values in hash tables and how to implement them in mapping.
    In my scenario I have two fields matnum and quantity.if matnum is not null ,then we have to check whether the matnum exists in hash table and also check whether the hash table is empty or not.
    How we can do this in graphical message mapping? 
    how to store the variable matnum in a table?
    If global variables are used, how to implement in mapping.how we call the keys from hash table ?

    Divya,
    We have a similiar requirement for getting different values. Below param1 may you be matnum,param2 is quantity
    What you need to do is first declare global varaible(A), fill hash table as below(B) and retrieve(C) based on index. You can tweak code based on your requirement
    (A) Declare global variable(last icon in message mapping tool bar)
         String globlalString[] = new String[10];
    (B) Fill Hash Table
    import java.util.Hashtable;
    public void saveparam1(String[] param1,String[] param2,ResultList result,Container container){
    Hashtable htparam1 = new Hashtable();
    int Indx = 0;
    for (int i = 0 ;i < param1.length ; i++) {
      String strparam1 = param1<i>.trim();
      if (strparam1.length() > 0) {
        Object obj = htparam1.get(strparam1);
        if (obj == null){
          globlalString[Indx++] = strparam1 ;
          htparam1.put(strparam1,strparam1);
    if (Indx < globalString.length) {
      for (int i = 0;  i < param2.length ; i++) {
        String strparam2 = param2<i>.trim();
        if (strparam2.length() > 0) {
          Object obj = htparam1.get(strparam2);
          if (obj == null){
            globalString[Indx++] = strparam2 ;
            htparam1.put(strparam2,strparam2);
    result.addValue(globalString[0]); // for first value
    (C) for subsequent reading/accessing
    //pass constant whatever number is required to this function
    String retValue = "";
      int indx = Integer.parseInt(index);
      indx = indx - 1;
      if ((indx >= 0) && (indx < globalString.length)){
       retValue = globalString[indx];
    return retValue;
    Hope this helps!

  • How to generate the sequential number in Javascript

    Hi ,
    I am facing one issue.
    I am adding the record to the underneath record and it works fine. But I have one problem there. I am having 10 records and adding one record between any of those records. I can able to reinitialize the index using xfa.form.recalculate(1). it works fine..
    Issue is : Newly inserted subform has 10 fields....But the issue is, I have to populate the number on the one of the field(F1) in newly added recordbetween 8&9 and the field F1 values to be 001. If I add second record between 18th and 19th record that record F1 field should become 002...It is not one way they may even create the record between 2 and 3 after created the 18th record.. Now I have to renumbering the all newly added records like 2&3 F1 become 001....8&9 F1 become 002...18th&19th F1 should have 003..
    As you said, I took the get full year with substring.  The number is : last two digit of year+ F or R + (sequence number 001 or 002 or 003 only newly added record fields F1)..
    I added the code in click event rightnow I am getting 10F- ... I dont know how to get sequence number for Only Newly added records..
    when I add it first time I can populate the 001..But when I add the second record I have to somehow remind it already I added 001 and this time I have to add 002..Globally can we declare the varaible ?
    Help really appreciated...
    Thanks
    GJ

    Hi Chandra,
    let say I am creating one global varaible a = 1. In the event directly I can use a = a++ like that right..No need of var a statement..
    Thanks
    GJ

  • Some questions to the experts

    I have observed some things the reason for which I do not understand:
    What is the purpose of function Main () ?
    Is it just a wrapper around the initial stuff ?
    I assume that global definitions must still precede this.
    Adobe's examples (e.g. SnpCreateDialog) use the form
    SnpCreateDialog.prototype.run = function() { ...}
    rather than simply function SnpCreateDialog () { ...}
    What is the rationale behind this?
    I have also found a that certain Unicode characters are not allowed in comments of an UTF-8 coded script. In my lengthy script (now > 1000 lines) I needed a regex in the editor to find the culprit: [^\p{L}\p{N}\p{P}\s\$\<\>=+\^]
    // goRtfDoc.Close ... // must be postponed to keep the ¶-IDs intact
           This creates the error
    Error Message      : Character conversion error
    Script, Line#   : H:\Adobe\framemaker.12en\AdobeFrameMaker12\6,  0
         Replacing the symbol ¶ by the word paragraph fixed the error.
        =>  Is there a list of 'unallowed' characters or vice versa a list of allowed characters (also for string constants?).

    Thanks Rick for the recommended books.
    I have already looked into The Good Parts" by Crockford and decided to first check for the pitfalls (chapter "Bad parts") before I continue with my project.
    There are real surpirses, for example the === and !==  (I have used == and !== for equal/not-equal assuming the NOT is a 'prefix').
    Well, concerning the Awful parts I can not follow all the recommendations there: e.g. I need global varaibles and ararays. On the other hand, automatic semicolon insertion must really be avoided.
    I will check whether my Unicode problem is the result of the 'design for 16 bit' (in which range my character was).
    BTW I have not found any reference in the Scripting Guide which coding is allowed for Escripts. A test reveals that ESTK produces UTF-8 files. In the FDK documents there is also no mention of the coding of the source. So it is unclear whether an Escript may be written in a Windows code page (1250, 1251, 1252).
    Using JSLint (http://www.jslint.com/) is not that encouraging:
    All Escript examples I have (including Yours and Yours and Adobe's) do not observe a main requirement: declare a function before it is used. And unfortunately this requirement can not be switched off, so other errors are only found at the start of a not so buggy script. The ESTK is not a help in finding bad practice constructs - what else is available besided the experise of seasoned scripters like You?
    For example, I'm not a fan of writing function ExpandInBook(book) { ... } rather than function ExpandInBook (book) {...}
    For clarity / ability to comment I write
    function DefineMenus () {
      giLvlTrace += 1; ZTrace ("DefineMenus");
      var sMenuMain   = gasIniTexts[0];
      var sMenuDocu   = gasIniTexts[1];
      var sMenuColl   = gasIniTexts[2];
    rather than
    function DefineMenus () {
      giLvlTrace += 1;
      ZTrace ("DefineMenus");
      var sMenuMain   = gasIniTexts[0], sMenuDocu   = gasIniTexts[1], sMenuColl   = gasIniTexts[2];
    Of course style is often a matter of taste - but I try to keep up with proven practice.

  • JDBC lookup returing only single row

    Hi All,
       I am doing a jdbc lookup using graphical function in message mapping.  I am able to connect the database and retrive result, but only one row.
      I am expecting mulitple rows as ouput in lookup. if i am excuting the same query directly in database i am getting multiple rows as output.
      I am coonecting to a sql 2005 database .
    Please advice how to get multiple rows in output.
    is ther any additional configuration , i have to do for getting multiple rows
    Regards
    Pradeep P N

    Hi,
    You need to use some global variables and store your output..if want to use multiple rows data..
    as the return is type string you can return only row from the UDF...
    I have used global varaibles to store the data and retrieved from the same where ever needed..
    HTH
    Rajesh

  • Static class variable

    Folks:
    I am little confused by static class variables in Java. Since Java doesn't have global varaibles it uses static variables instead. Please take a look at the following code and please tell me what goes wrong.
    /********** CONTENT OF Stack.java ***********/
    import java.util.Stack;
    public class StackClass
    {   static  Stack stack = new Stack (); }
    /********** CONTENT OF Test1 .java ***********/
    public class Test1
    public static void main( String[] args )
    StackClass.stack.push("Hello World");
    /********** CONTENT OF Test2.java ***********/
    public class Test2
    public static void main( String[] args )
    System.out.println( "Top on stack is " + StackClass.stack.peek() );
    I execute the above programs in the sequence of StackClass.java, Test1.java and Test2.java. I think in Test1.java after I push one element to the stack it should still be in the stack in Test2.java But I got :
    java.util.EmptyStackException
         at java.util.Stack.peek(Unknown Source)
         at Test2.main(Test2.java:16)
    Exception in thread "main"
    Can anybody give me a hint?
    Thanks a lot !

    After you run StackClass, the JVM (java.exe) ends and all the classes are unloaded including StackClass
    When you run Test1, StackClass is loaded, an item is pushed on the stack, and then the JVM exits and all classes are unloaded including StackClass
    When you run Test2, StackClass is loaded, and you get an error because the StackClass which was just loaded has no items in it.

  • Best practice for creating a sum of a formula?

    What is the best way to create a sum on multiple groups from a formula or another sum?
    Sum ({IC_ADJS_JNL.QTY}, {IC_ITEM_MST.ALT_ITEMB}) * {NT_CONV_FCT.NET} - This is sitting in GF1, but I also need the sum of this on GF2.
    {NT_USED_DEM.USAGE_QTY} - {@RPK_LBS} - another example sitting in GF1 but needs its sum in GF2
    Hopefully I have explained this well enough. Thanks in advance for your help!

    You can create make use of global variable, the logic is similar to running total.
    What you do is:
    1. You initialize a global variable.
    Whileprintingrecords
    numbervar gcount::=0;
    2. You accumulate the variable at the section you want.
    Whileprintingrecords;
    numbervar gcount;
    gcount:=gcount + xxxx
    If you need certain condition, just use if statment like normal.
    3. To display the global varaible
    Whileprintingrecords;
    numbervar gcount;

  • Single select option in launch variables

    Hi,
    I am using hyperion 9.3.0 , i have written a HBR , but the problem is that the launch varaibles are giving multiple select option , how can i restrict the launch variable to have a single select option only.the launch varaibles are global varaibles. do i need to do some changes in the global varaible or the HBR and what changes would be required.thanks in advance.

    Maybe you have set the variable to be members instead of type member.
    Cheers
    John
    http://john-goodwin.blogspot.com/

  • Dynamic UIs: Error: Duplicate variable name

    Hello Friends
    I am facing one difficulty in dynamic UIs and i.e. whenever I want to add some more Dynamic UIs to the existing one it throws error like "Duplicate valriable name".
    I am having my code in wdDoModifyView
    Whatever I want to show in the start I put that code in if(firstTime) and whenever I am adding something I put that code in if(!firstTime).
    I also used view.resetView() but that too didnt worked.
    Can anyone gimme some idea how to get rid of this problem on adding some more dynamic UIs.
    Help me

    Hi Vivek,
    Check this link..
    http://help.sap.com/search/highlightContent.jsp
    One small idea..
    use a global varaible say count....
    in the wddomodifyview
    .createElement(IWD<"UIElement">.class,"<UIElementName>"+count);
    count++;
    so when ever you add new element it will have different id's

Maybe you are looking for

  • Applications sync back to itunes

    I downloaded some free applications from my ipod touch using the app store and I also bought one, but when I sync my ipod to itunes the applications that I downloaded from my ipod touch do not appear in the applications library in itunes. The only ap

  • Fixed length output

    I need to write lots of data to a file. I retrieve the data from the DB. The data is not formatted correctly from the DB so I need to pad or truncate to fixed lengths. I need to perform this conversion for doubles ie 15 integer places 3 decimal. I al

  • Epson Stylus Pro 3800 afraid of Mountain Lion.

    Having followed all the advice in previous discussions: Downloaded latest OS X updates; and downloaded Epson V9.04; removed all Epson software; reset printer system; (not in that order, of course) ...I still am no nearer to getting control of my prin

  • No album artwork after IOS 8.1.2 update

    after updating to IOS 8.1.2 on my iPhone 5 all my album artwork in my music has disappeared. I have tried connecting it to iTunes and hitting get artwork but it still doesn't work.

  • PSE3 Raw Converter:  (+Exp. Comp) vs (-Exp Comp and +Brightness)

    When I open Nikon D70 *.nef files in the standard editor, the raw converter usually has preselected or chosen to lower exposure compensation and then raise the brightness level (this is when all the "auto" settings boxes are checked). Other than usin