Calling a frame to return a value

I have a frame with a JButton. When pressed, a calendar frame I had created will be displayed. A user will select the date from the calendar frame and the value will be returned to the frame where the JButton was pressed.
The following is a section of the code from the Calendar frame I created.
public String getDate(){
    this.setVisible(true);
    return date;  /* A variable declared on creation to hold the date value when selected*/
}Code from the frame calling the Calendar frame.
private void jButtonDate_actionPerformed(ActionEvent e) {
     CalendarFrame cal = new CalendarFrame();   
     String date = cal.getDate();
     System.out.println(date);  /* Used as a test to see if the call is performed correctly.*/
}When the date Button is pressed, the calendar frame is displayed and null is printed to the output window.
My problem is that I don't want the program to do anything until a date has been selected.
Does anyone have any idea as to what I am doing wrong? Any ideas would be helpful.
Jason Franz.

So, this is what I have in my code.
I have the CalendarFrame extending JDialog.
public class CalendarFrame extends JDialog {Now I'm not to sure on what you mean about the "parentFrame".
super(parentFrame, "Pick a Date", true);This is what my constructor looks like.
  public CalendarFrame() {
    super();
    try  {
      jbInit();
    catch (Exception e) {
      e.printStackTrace();
  }Jason

Similar Messages

  • Calling a stored procedure which returns a value

    Hi Friends,
    I want to call a stored procedure which returns a value.
    Eg
    create or replace procedure xyz(a1 in varchar2, a2 in varchar2, z1 out number)
    thanks

    Hi,
    use this.
    declare
    retval number;
    begin
    abc('aaa','bbb',retval);
    dbms_output.put_line('retval is ' ||retval);
    end;
    --Basava.S                                                                                                                                                                                                                                                                                               

  • How to Return a value to a 10g Oracle Form form a Web Service Call

    I've read the demo available from Oracle, 'Calling a Web service from Oracle Forms', that shows how to invoke a call to a Web Service from a Form. The demo only shows how to do a call and how to display messages. I've done some searching, but can't seem to find any examples of how to return a value from the call into a field on the form. If any one could provide an example of that, I would greatly appreciate it.
    We are in the process of modifing a form and we would like to use a webservice, which we have never done before. We have created a webservice which calculates a value based upon what is entered on the form and we want to pass that calculated value back to a field on the form.
    This is the code provided by the demo to do a call.
    DECLARE
    jo ora_java.jobject;
    xo ora_java.jobject;
    rv varchar2(100);
    ex ora_java.jobject;
    BEGIN
    JO := SendServiceSoapClient.new;
    RV := SendServiceSoapClient.sendMessage(JO,:BLOCK3.PHONE_NUMBER, :BLOCK3.MESSAGE_BODY, xo, xo);
    EXCEPTION
    WHEN ORA_JAVA.JAVA_ERROR then
    message('Unable to call out to Java, ' ||ORA_JAVA.LAST_ERROR);
    WHEN ORA_JAVA.EXCEPTION_THROWN then
    ex := ORA_JAVA.LAST_EXCEPTION;
    message(Exception_.toString(ex));
    END;

    In the future, please be sure to include the exact product versions you are using. In this case, also be sure to include the java versions you are using to build your java code.
    http://blogs.oracle.com/shay/entry/10_commandments_for_the_otn_fo
    Regarding your question, take a look at this older white paper which discusses integrating Forms with SOA.
    http://www.oracle.com/technetwork/developer-tools/forms/documentation/forms-soa-wp-1-129441.pdf

  • Help with modal dialog returning a value to the calling page

    Greetings,
    Apex Version: 4.1.0.0.32
    What I am trying to do is to create a modal dialog that is called from a form page. The dialog will present the user with an IR report that will allow the him to select a row and return a value from that row to a field on the calling page. I have it working in Firefox, but I get an error using IE 8. I hope someone can show me why it is not working in IE.
    Here is how I am doing it:
    From the calling page:
    Created a button
         Action: Redirect to URL
         URL Target: javascript:var rc = window.showModalDialog('f?p=&APP_ID.:70:&SESSION.::&DEBUG.:::','','resizable:yes;center:yes;dialogWidth:1000px;dialogHeight:500px;');
    On the called page:
    The called page is an IR report where the query returns this as one of the columns:
    *(Note: I had to put a dot '.' in front of the onclick to get it to show in this thread. It is not there in my real code.)*
    select
    <a href="#" name="z" style="color:blue; text-decoration:underline;" .onclick="javascript:passBack(''' || LOT_NO ||''');">Select</a>' SelectThis
    , column1
    , column2
    from sometablename;This resolves the anchor to:
    <a .onclick="javascript:passBack('232158');"  href="#">Select</a>Here is the Javascript function that is called from the anchor onclick:
    function passBack(passVal1)
      opener.document.getElementById("P75_ITEM1").value = passVal1;
      close();
    }When I run this in Firefox, it works as expected. I click on the button on the parent page. The modal dialog is opened and the IR report is displayed. I click on one of the links in the report and it returns the correct value back to the calling page and closes the modal dialog.
    When I run it in IE8, it fails. I click on the button on the parent page. The modal dialog is opened and the IR report is displayed. I click on one of the links in the report and I get this error: “opener.document is null or not an object”.
    I hope that is clear and that someone can help.
    Thanks
    Larry

    A quick google search determines that window.opener doesn't exists when using window.showModalDialog
    Suggestions range from using window.open instead of window.showModalDialog to using dialogArguments instead of window.opener
    Try the following:
    In the parent page define a getPopupValue() function:
    function getPopupValue(){
       var dr =  window.showModalDialog('f?p=&APP_ID.:70:&SESSION.::&DEBUG.:::','','resizable:yes;center:yes;dialogWidth:1000px;dialogHeight:500px;');
        if ( (dr != undefined) && (dr != '') && (dr != false) ){
         $x("P75_ITEM1").value = dr;
    }Change the button url to call the function:
    javascript:getPopupValue(); On the popup page change the passback function to:
    function passBack(passVal1)
      returnValue = passVal1;
      close();
    }

  • Call plsql procedure from ADFBC which returns a value.

    Hi All,
    I want to call one of my SQL Procedures which returns 4 values after execution from my AMImpl file.
    The code snippet on how I am trying to call the procedure is below, but I am in need of how to fetch the return value of the procedure once its executed.
    public void callPlSql(String firstParm, String secondParm) {
    CallableStatement s = this.getDBTransaction().createCallableStatement("BEGIN my_pl_sql_procedure(?, ?); END;", 0);
    try {
    s.setString(1,firstParm);
    s.setString(2,secondParm);
    s.execute;
    } catch (SQLException e) {
    throw new JboException(e);
    any idea how to get hold of the return values from the executed procedure ?
    Thanks
    TK

    after you executed the procedure, you can get the output based on their type and index
    public void callPlSql(String firstParm, String secondParm) {
    CallableStatement s = this.getDBTransaction().createCallableStatement("BEGIN my_pl_sql_procedure(?, ?); END;", 0);
    try {
    s.setString(1,firstParm);
    s.setString(2,secondParm);
    s.execute;
    e.getDate(index of your output);
    e.getInt(index of your output);
    e.getString(index of your output);
    } catch (SQLException e) {
    throw new JboException(e);
    }you can also check this:
    http://download.oracle.com/docs/cd/E15523_01/web.1111/b31974/bcadvgen.htm#sm0458

  • Registry calls return wrong values - how to fix?

    Here is the code used to open the key (all the variations shown produce the same behaviour)
    bool Win32_OpenKey( const HKEY uPlaceInRegistry, HKEY& xKey, const char* const szKeyName, const bool bReadOnly = false )
    // SE: make sure key exists
    // SE - NOTE: this is deprecated. it worked fine, but suddenly doesnt :(
    // so i have replaced it with the following line
    //const bool bOpened = RegOpenKey( uPlaceInRegistry, szKeyName, &xKey ) == ERROR_SUCCESS;
    const bool bOpened = RegOpenKeyEx( uPlaceInRegistry, szKeyName, 0,
    bReadOnly ? KEY_QUERY_VALUE : KEY_ALL_ACCESS, &xKey ) == ERROR_SUCCESS;
    bool bCreated = false;
    if( !bOpened )
    // SE - NOTE: this is deprecated. it worked fine, but suddenly doesnt :(
    // the Licensor will create keys except in the case where we upgrade a user from
    // an old license... so now using the Ex version in hopes it magically works.
    //bCreated = RegCreateKey( uPlaceInRegistry, szKeyName, &xKey ) == ERROR_SUCCESS;
    DWORD uDisposition = -1;
    bCreated = ( RegCreateKeyEx( uPlaceInRegistry, szKeyName, 0, 0,
    REG_OPTION_NON_VOLATILE, bReadOnly ? KEY_QUERY_VALUE : KEY_ALL_ACCESS,
    0, &xKey, &uDisposition )
    == ERROR_SUCCESS );
    return bOpened || bCreated;
    Here is where the values are queried.
    unsigned int uMagic = 0;
    unsigned long uType = 0xFFFFFFFF;
    unsigned long uSize = sizeof( unsigned int );
    //long err = RegGetValue( xKey, 0, "Magic", RRF_RT_DWORD, &uType, &uActivated, &uSize );
    uType = REG_DWORD;
    long err = RegQueryValueEx( xKey, "Magic", 0, &uType, reinterpret_cast< LPBYTE >( &uMagic ), &uSize );
    if( (err == ERROR_SUCCESS) && ( uType == REG_DWORD ) && ( uSize == sizeof( unsigned int ) ) )
    unsigned long long ullReadStartDate = 0;
    uSize = sizeof( unsigned long long );
    err = RegGetValue( xKey, 0, "Number", RRF_RT_QWORD, &uType, &ullReadStartDate, &uSize );
    if( (err == ERROR_SUCCESS) && ( uType == REG_QWORD ) && ( uSize == sizeof( unsigned long long ) ) )
    The values that are returned do not match the registry.
    In fact the values returned are values that we never would have written either. The zero is fishy because maybe it indicates bad behaviour. The messed up time_t value is even more confusing... it comes from a more than 30 days ago, which is around the time
    when I first started working on this code.
    To make a guess I am getting back an ancient version of the key values which is somehow preserved and accessible but can not be seen in regedit. I have no idea why this is suddenly happening either - this code (before my commented changes were made) worked
    exactly as expected for a few weeks now.
    Slightly unrelated but it also seems that a standard user can not write to HKCU in our repeatable tests. This seems slightly crazy as well... should I just not be using the registry? It never seemed like a good idea, but I have done it to try and fit the
    platform way of doing things after hitting lots of problems with naive use of files...

    thanks for the tips. will probably come in handy in the future. :)
    it turned out to be permissions and bad documentation in my case. the virtual store thing was not writing to where the docs say it should, and so something was lingering somewhere i couldn't find in the right place under any of the top level registry keys.
    maybe there is some other place where it has gone in the registry that i am just not finding the documentation for...
    my ultimate fix was to use a file in ProgramData :)
    I figured I'd try and do it 'the MS way' and use the registry. what a terrible idea that turned out to be, since I guess its no longer the MS way given how riddled with backwards compatibility hacks it seems to be...

  • F4IF_INT_TABLE_VALUE_REQUEST - how can I return all values from the line?

    Hi,
    I'm using FM F4IF_INT_TABLE_VALUE_REQUEST to show a pop-up with my internal table values.  The internal table has 3 fields, ATINN, ATZHL and a description field ATWTB.  ATINN and ATZHL are needed to complete the unique table key, however this FM will only return the value of one field in any line I select.
    How can I see all the values in the line I select in the return table?
    My code is as follows:
      DATA: tbl_cawnt LIKE cawnt OCCURS 0,
            wa_cawnt LIKE cawnt,
            BEGIN OF tbl_list OCCURS 0,
              atinn LIKE cawnt-atinn,
              atzhl LIKE cawnt-atzhl,
              atwtb LIKE cawnt-atwtb,
            END OF tbl_list,
            wa_list LIKE tbl_list,
            tbl_return LIKE ddshretval OCCURS 0,
            wa_return LIKE ddshretval,
            tbl_fields LIKE dfies OCCURS 0,
            tbl_dynp LIKE dselc OCCURS 0.
      REFRESH: tbl_list, tbl_cawnt.
      SELECT atinn atzhl atwtb
        FROM cawnt
        INTO CORRESPONDING FIELDS OF TABLE tbl_cawnt
        WHERE spras EQ sy-langu.
      LOOP AT tbl_cawnt INTO wa_cawnt.
        CLEAR wa_list.
        MOVE: wa_cawnt-atwtb TO wa_list-atwtb,
              wa_cawnt-atinn TO wa_list-atinn,
              wa_cawnt-atzhl TO wa_list-atzhl.
        APPEND wa_list TO tbl_list.
      ENDLOOP.
      CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
        EXPORTING
          retfield        = 'ATWTB'
          dynpprog        = sy-repid
          dynpnr          = sy-dynnr
          value_org       = 'S'
        TABLES
          value_tab       = tbl_list
          return_tab      = tbl_return
        EXCEPTIONS
          parameter_error = 1
          no_values_found = 2
          OTHERS          = 3.
      IF sy-subrc <> 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ENDIF.
    Thanks!

    Hi,
      Use the structure DYNPFLD_MAPPING
    With this internal table you can easily define that you want to return
    other columns of the hit list in addition to field RETFIELD to the
    screen.
    In this IT you can MAP the screen fields to the serch help screen fields this has three fields
    FLDNAME this is the field anme from the search help
    FLDINH This has to be blank which would be field with the field value that you want to map
    DYFLDNAME THis is the screen field name.
    So here you can get the values for the other fields that you want which are on the search help just populate the name of the fields in FLDNAME.
    Regards,
    Himanshu

  • [UIX] How To: Return multiple values from a LOV

    Hi gang
    I've been receiving a number of queries via email on how to return multiple items from a LOV using UIX thanks to earlier posts of mine on OTN. I'm unfortunately aware my previous posts on this are not that clear thanks to the nature of the forums Q&A type approach. So I thought I'd write one clear post, and then direct any queries to it from now on to save me time.
    Following is my solution to this problem. Please note it's just one method of many in skinning a cat. It's my understanding via chatting to Oracle employees that LOVs are to be changed in a future release of JDeveloper to be more like Oracle Forms LOVs, so my skinning skills may be rather bloody & crude very soon (already?).
    I'll base my example on the hr schema supplied with the standard RDBMS install.
    Say we have an UIX input-form screen to modify an employees record. The employees record has a department_id field and a fk to the departments table. Our requirement is to build a LOV for the department_id field such that we can link the employees record to any department_id in the database. In turn we want the department_name shown on the employees input form, so this must be returned via the LOV too.
    To meet this requirement follow these steps:
    1) In your ADF BC model project, create 2 EOs for employees and departments.
    2) Also in your model, create 2 VOs for the same EOs.
    3) Open your employees VO and create a new attribute DepartmentName. Check “selected in query”. In expressions type “(SELECT dept.department_name FROM departments dept WHERE dept.department_id = employees.department_id)”. Check Updateable “always”.
    4) Create a new empty UIX page in your ViewController project called editEmployees.uix.
    5) From the data control palette, drag and drop EmployeesView1 as an input-form. Notice that the new field DepartmentName is also included in the input-form.
    6) As the DepartmentName will be populated either from querying existing employees records, or via the LOV, disable the field as the user should not have the ability to edit it.
    7) Select the DepartmentId field and delete it. In the UI Model window delete the DepartmentId binding.
    8) From the data controls palette, drag and drop the DepartmentId field as a messageLovInput onto your page. Note in your application navigator a new UIX page lovWindow0.uix (or similar) has been created for you.
    9) While the lovWindow0.uix is still in italics (before you save it), rename the file to departmentsLov.uix.
    10) Back in your editEmployees.uix page, your messageLovInput source will look like the following:
    <messageLovInput
        model="${bindings.DepartmentId}"
        id="${bindings.DepartmentId.path}"
        destination="lovWindow0.uix"/>Change it to be:
    <messageLovInput
        model="${bindings.DepartmentId}"
        id="DepartmentId"
        destination="departmentsLov.uix"
        partialRenderMode="multiple"
        partialTargets="_uixState DepartmentName"/>11) Also change your DepartmentName source to look like the following:
    <messageTextInput
        id=”DepartmentName”
        model="${bindings.DepartmentName}"
        columns="10"
        disabled="true"/>12) Open your departmentsLov.uix page.
    13) In the data control palette, drag and drop the DepartmentId field of the DepartmentView1 as a LovTable into the Results area on your page.
    14) Notice in the UI Model window that the 3 binding controls have been created for you, an iterator, a range and a binding for DepartmentId.
    15) Right click on the DepartmentsLovUIModel node in the UI Model window, then create binding, display, and finally attribute. The attribute binding editor will pop up. In the select-an-iterator drop down select the DepartmentsView1Iterator. Now select DepartmentName in the attribute list and then the ok button.
    16) Note in the UI Model you now have a new binding called DCDefaultControl. Select this, and in the property palette change the Id to DepartmentName.
    17) View the LOV page’s source, and change the lovUpdate event as follows:
    <event name="lovSelect">
        <compound>
            <set value="${bindings.DepartmentId.inputValue}" target="${sessionScope}" property="MyAppDepartmentId" />
            <set value="${bindings.DepartmentName.inputValue}" target="${sessionScope}" property="MyAppDepartmentName" />
        </compound>
    </event>18) Return to editEmployees.uix source, and modify the lovUpdate event to look as follows:
    <event name="lovUpdate">
        <compound>
            <set value="${sessionScope.MyAppDepartmentId}" target="${bindings.DepartmentId}" property="inputValue"/>
            <set value="${sessionScope.MyAppDepartmentName}" target="${bindings.DepartmentName}" property="inputValue"/>     
        </compound>
    </event>That’s it. Now when you select a value in your LOV, it will return 2 (multiple!) values.
    A couple things to note:
    1) In the messageLovInput id field we don’t use the “.path” notation. This is mechanism for returning 1 value from the LOV and is useless for us.
    2) Again in the messageLovInput we supply “_uixState” as an entry in the partialTargets.
    3) We are relying on partial-page-refresh functionality to update multiple items on the screen.
    I’m not going to take the time out to explain these 3 points, but it’s worthwhile you learning more about them, especially the last 2, as a separate exercise.
    One other useful thing to do is, in your messageLovInput, include as a last entry in the partialTargets list “MessageBox”. In turn locate the messageBox control on your page (if any), and supply an id=”MessageBox”. This will allow the LOV to place any errors raised in the MessageBox and show them to the user.
    I hope this works for you :)
    Cheers,
    CM.

    Thanks Chris,
    It took me some time to find the information I needed, how to use return multiple values from a LOV popup window, then I found your post and all problems were solved. Its working perfectly, well, almost perfectly.
    Im always fighting with ADF-UIX, it never does the thing that I expect it to do, I guess its because I have a hard time letting go of the total control you have as a developer and let the framework take care of a few things.
    Anyway, I'm using your example to fill 5 fields at once, one of the fields being a messageChoice (a list with countries) with a LOV to a lookup table (id , country).
    I return the countryId from the popup LOV window, that works great, but it doesn't set the correct value in my messageChoice . I think its because its using the CountryId for the listbox index.
    So how can I select the correct value inside my messageChoice? Come to think of it, I dont realy think its LOV related...
    Can someone help me out out here?
    Kind regards
    Ido

  • Return multiple values from a function to a SELECT statement

    I hope I've provided enough information here. If not, just let me know what I'm missing.
    I am creating a view that will combine information from a few tables. Most of it is fairly straightforward, but there are a couple of columns in the view that I need to get by running a function within a package. Even this is fairly straightforward (I have a function named action_date in a package called rp, for instance, which I can use to return the date I need via SELECT rp.action_date(sequence_number).
    Here's the issue: I actually need to return several bits of information from the same record (not just action_date, but also action_office, action_value, etc.) - a join of the tables won't work here as I'll explain below. I can, of course, run a separate function for each statement but that is obviously inefficient. Within the confines of the view select statement however, I'm not sure how to return each of the values I need.
    For instance, right now, I have:
    Table1:
    sequence_number NUMBER(10),
    name VARCHAR(30),
    Table2:
    Table1_seq NUMBER(10),
    action_seq NUMBER(10),
    action_date DATE,
    action_office VARCHAR(3),
    action_value VARCHAR(60),
    I can't simply join Table1 and Table2 because I have to do some processing in order to determine which of the matching returned rows I actually need to select. So the package opens a cursor and processes each row until it finds the one that I need.
    The following works but is inefficient since all of the calls to the package will return columns from the same record. I just don't know how to return all the values I need into the SELECT statement.
    CREATE VIEW all_this_stuff AS
    SELECT sequence_number, name,
    rp.action_date(sequence_number) action_date,
    rp.action_office(sequence_number) action_office,
    rp.action_value(sequence_number) action_value
    FROM table1
    Is there a way to return multiple values into my SELECT statement or am I going about this all wrong?
    Any suggestions?
    Thanks so much!

    Hi,
    What you want is a Top-N Query , which you can do using the analytic ROW_NUMBER function in a sub-query, like this:
    WITH     got_rnum     AS
         SELECT     action_seq, action_dt, action_office, action_type, action_value
         ,     ROW_NUMBER () OVER ( ORDER BY  action_date
                                   ,            action_seq
                             ,            action_serial
                           ) AS rnum
         FROM     table2
         WHERE     action_code     = 'AB'
         AND     action_office     LIKE 'E'     -- Is this right?
    SELECT     action_seq, action_dt, action_office, action_type, action_value
    FROM     got_rnum
    WHERE     rnum     = 1
    ;As written, this will return (at most) one row.
    I suspect you'll really want to get one row for each group , where a group is defined by some value in a table to which you're joining.
    In that case, add a PARTITION BY clause to the ROW_NUMBER function.
    If you'd post a little sample data (CREATE TABLE and INSERT statements), I could show you exactly how.
    Since I don't have your tables, I'll show you using tables in the scott schema.
    Here's a view that has data from the scott.dept table and also from scott.emp, but only for the most senior employee in each department (that is, the employee with the earliest hiredate). If there happens to be a tie for the earliest hiredate, then the contender with the lowest empno is chosen.
    CREATE OR REPLACE VIEW     senior_emp
    AS
    WITH     got_rnum     AS
         SELECT     d.deptno
         ,     d.dname
         ,     e.empno
         ,     e.ename
         ,     e.hiredate
         ,     ROW_NUMBER () OVER ( PARTITION BY  d.deptno
                                   ORDER BY          e.hiredate
                             ,                e.empno
                           ) AS rnum
         FROM     scott.dept     d
         JOIN     scott.emp     e     ON     d.deptno     = e.deptno
    SELECT     deptno
    ,     dname
    ,     empno
    ,     ename
    ,     hiredate
    FROM     got_rnum
    WHERE     rnum     = 1
    SELECT     *
    FROM     senior_emp
    ;Output:
    .    DEPTNO DNAME               EMPNO ENAME      HIREDATE
            10 ACCOUNTING           7782 CLARK      09-JUN-81
            20 RESEARCH             7369 SMITH      17-DEC-80
            30 SALES                7499 ALLEN      20-FEB-81 
    By the way, one of the conditions in the query you posted was
    action_office     LIKE 'E'which is equivalent to
    action_office     = 'E'(LIKE is always equivalent to = if the string after LIKE doesn't contain any wildcards.)
    Did you mean to say that, or did you mean something like this:
    action_office     LIKE 'E%'instead?

  • Returning several values from a C native method

    Hi,
    I need to return 3 values from a native methode : an int (the return code), a string of variable length and a double.
    In pure C, my function would be defined as "int f ( char* s, double* d)", and I would "malloc" the string into the calling function, then copy my string to "s" and use "*d" to return the double...
    Is there a way to do that with JNI? I found some examples where the native function returns only one parameterlike: "return(*env)->NewStringUTF(env, buffer);" But I didn't find examples where the native function returns several parameters, including a string.
    Thanks in advance!
    JM

    This really has nothing to do with JNI.
    You have a method, and you want to return more than one type of value.
    The following solutions are possible.
    1. Return an array that contains all the values (actual return value.)
    2. Return an object that contains all the values (actual return value.)
    3. Use an array via the parameter list and fill in a value.
    4. Use an object via the parameter list and fill in the values.

  • Can F4IF_INT_TABLE_VALUE_REQUEST FM return a value in a global variable?

    Hi everybody,
    I need to use F4IF_INT_TABLE_VALUE_REQUEST FM because I have to let users select an specific option before choosing another value. The point is that I need to save in a program global variable what the user selects, and decide something with it in the program.
    Is it possible that F4IF_INT_TABLE_VALUE_REQUEST FM returns the value in a sinple variable or it has to be paramter?
    I look in a lot of previous threads but I didn't find anything, and I don't know if it's possible.
    Thanks and kind regards,
    MMP.

    Hi,
    Sure you can. All you need to do is to store what the function returns in your global variable. It don't need to be returned back to screen field.
    DATA: BEGIN OF VALUES OCCURS 0,
             CARRID TYPE SPFLI-CARRID,
             CONNID TYPE SPFLI-CONNID,
           END OF VALUES.
    DATA: VALUES_TAB TYPE TABLE OF VALUES,
              G_VALUE TYPE SPFLI-CONNID.  "global variable to store what is returned
    "in PAI first populate your table
      SELECT  CARRID CONNID
        FROM  SPFLI
        INTO  CORRESPONDING FIELDS OF TABLE VALUES_TAB
        UP TO 10 ROWS.
    "then call the function but don't return the value to screen field
    "If you specify the import parameters DYNPPROG, DYNPNR, and DYNPROFIELD, the useru2019s selection is
    "returned to the corresponding field on the screen. If you specify the table parameter RETURN_TAB, the
    "selection is returned into the table instead.
    CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
           EXPORTING
                RETFIELD         = 'CONNID'
                VALUE_ORG        = 'S'
           TABLES
                VALUE_TAB        = VALUES_TAB
                RETURN_TAB      = RETURN_TAB.
    "now simply read first row of return tab and store the value returned there in some global var
    READ RETURN_TAB INDEX 1.
    MOVE RETURN_TAB-FIELDVAL TO G_VALUE.
    Regards
    Marcin

  • How can I return some values from an applet invoked by jsp:plugin tag

    My JSP is something like that:
    <html>
         <head>
                 <title> . . . </title>
         </head>
         <script>
              function getValueFromApplet()
                   var src = document.pinApplet.checkPin();
                   document.myForm.j_username.value = document.pinApplet.tokenizeName(src);
                   alert(document.myForm.j_username.value);
                   document.myForm.j_password.value = document.pinApplet.tokenizePassword(src);
                   alert(document.myForm.j_password.value);
         </script>
            <body>
                    <jsp:plugin type="applet"
                          code="PinApplet.class"
                       codebase="/idp"
                       name="pinApplet"
                                width="300"
                                height="300">
                         <jsp:fallback> Authentication Form is not supported by the browser </jsp:fallback>
              </jsp:plugin>
                    <form action="https://xxx.xxx.xxx"
                   name="myForm"
                   method="post" onSubmit="return getValueFromApplet()">
              <table>
                   <td><input type="submit" value="OK" >
                   <td><input type="hidden" id="j_username" name="j_username" value=""></td>
                   <td><input type="hidden" id="j_password" name="j_password" value=""></td>
              </table>
              </form>
         </body>checkPin() returns "alice--alice"
    tokenizeName() returns the first token: alice
    tokenizePassword() returns the second token: alice
    When I test the applet in the IDE, it returns the values properly, but not in the JSP invokation.

    evnafets wrote:
    javascript will not be executing on the server. You can rule that one out.
    Is your Applet being initialised correctly?
    Where have you got the classes for it? I think the applet doesn't need any kind of initialization, because it doesn't have any variables and all the process is made in the method called by onsubmit()
    The applet is composed only by one class and I'm totally sure that the class is placed in the correct place.
    evnafets wrote:
    I would say put in a couple more alerts - one before the call to the applet, one after.
    put some logging statements in your applet to see if it gets there.In the javascript, there are two alerts between the three calls to the applet. Where do you advise me to put more alerts?
    I don't understand what do you refer when you say "logging statements"
    I am going to test again the call to the applet in order to find some kind of code that can be invalid or that can make the function to "crash"

  • How to return multiple values from dialog popup

    hi all
    I'm using ADF 10g. I have a requirement that I have to return multiple values from a dialog.
    I have a page containing a table with a button which calls the dialog. The dialog contains a multi-select table where i want to select multiple records and add them to the table in the calling page.
    In the backing bean of the calling page, I have the returnListener method.
    I am thinking that I have to store the selected rows from dialog in an array and return that array to the returnListener...but I don't know how to go about it with the code.
    Can someone help me out with it?
    thanks

    Hi Frank,
    I'm trying to implement your suggestion but getting comfused.
    AdfFacesContext.getCurrentInstance().returnFromDialog(null, hashMap) is called in ActionListener method, from what I understood.
    ReturnListener method already calls it, so no need to call explicitly.
    Okay here's what i'm doing.
    command button launches the dialog on the calling page.
    In the dialog page, there is a button "select", which when i click, closes the dialog and returns to calling page. I put a af:returnActionListener on this button, which logically should have a corresponding ReturnListener() in the calling page backing bean.
    Now I have 3 questions:
    1. do i have to use ActionListener or ReturnListener?
    2. where do I create the hashMap? Is it in the backing bean of the dialog or in the one of calling page?
    3. how do I retrieve the keys n values from hashmap?
    please help! thanks
    This is found in the backing bean of calling page:
    package mu.gcc.dms.view.bean.backing;
    import com.sun.java.util.collections.ArrayList;
    import com.sun.java.util.collections.HashMap;
    import com.sun.java.util.collections.List;
    import java.io.IOException;
    import java.util.Map;
    import javax.faces.application.Application;
    import javax.faces.application.ViewHandler;
    import javax.faces.component.UIViewRoot;
    import javax.faces.context.FacesContext;
    import javax.faces.el.ValueBinding;
    import javax.faces.event.ActionEvent;
    import mu.gcc.dms.model.services.DMSServiceImpl;
    import mu.gcc.dms.model.views.SiteCompaniesImpl;
    import mu.gcc.dms.model.views.SiteCompaniesRowImpl;
    import mu.gcc.dms.model.views.lookup.LkpGlobalCompaniesImpl;
    import mu.gcc.util.ADFUtils;
    import mu.gcc.util.JSFUtils;
    import oracle.adf.model.BindingContext;
    import oracle.adf.model.binding.DCBindingContainer;
    import oracle.adf.model.binding.DCIteratorBinding;
    import oracle.adf.view.faces.context.AdfFacesContext;
    import oracle.adf.view.faces.event.ReturnEvent;
    import oracle.adf.view.faces.model.RowKeySet;
    import oracle.binding.AttributeBinding;
    import oracle.binding.BindingContainer;
    import oracle.binding.OperationBinding;
    import oracle.jbo.AttributeDef;
    import oracle.jbo.Key;
    import oracle.jbo.Row;
    import oracle.jbo.RowIterator;
    import oracle.jbo.RowSetIterator;
    import oracle.jbo.domain.Number;
    import oracle.jbo.server.java.util.Iterator;
    public class CompanyList {
    private BindingContainer bindings;
    private Map hashMap;
    DMSServiceImpl service =(DMSServiceImpl)ADFUtils.getDataControlApplicationModule("DMSServiceDataControl");
    SiteCompaniesImpl siteCompanyList = service.getSiteCompanies();
    LkpGlobalCompaniesImpl globalCompanyList = service.getLkpGlobalCompanies();
    public CompanyList() {
    public BindingContainer getBindings() {
    return this.bindings;
    public void setBindings(BindingContainer bindings) {
    this.bindings = bindings;
    *public void setHashMap(Map hashMap) {*
    *// hashMap = (Map)new HashMap();*
    this.hashMap = hashMap;
    *public Map getHashMap() {*
    return hashMap;
    public String searchCompanyButton_action() {
    BindingContainer bindings = getBindings();
    OperationBinding operationBinding =
    bindings.getOperationBinding("Execute");
    Object result = operationBinding.execute();
    if (!operationBinding.getErrors().isEmpty()) {
    return null;
    return null;
    *public void addCompanyActionListener(ActionEvent actionEvent){*
    AdfFacesContext.getCurrentInstance().returnFromDialog(null, hashMap);
    public void addCompanyReturnListener(ReturnEvent returnEvent){
    //how to get hashmap from here??
    public String addCompanyButton_action() {
    return "dialog:globalLovCompanies";
    }

  • RUN_REPORT_OBJECT does not return  a value

    I am using Reports 6i (via web browser) on an Oracle 8 database.
    We have just recreated our entire development database. When running a report from a form, the web browser pops up with a blank screen. No changes has been done to the code. None of the reports now work on our dev environment.
    However, I have now found that RUN_REPORT_OBJECT is not retirning a value. What would cause RUN_REPORT_OBJECT not to return a value?
    My code behind the button on the form that calls the report is as follows:
              report_id := find_report_object('nl4689');
              f_file_name := :illprint.report_number||'.lis';
              html_file_name := :illprint.report_number||'.html';
              set_report_object_property(report_id,report_execution_mode,batch);
              set_report_object_property(report_id,report_comm_mode,synchronous);
              set_report_object_property(report_id,report_destype,file);
              set_report_object_property(report_id,report_desname,:global.user_home_dir||f_file_name);
              set_report_object_property(report_id, report_other,
              'p_branch='||:b1.branch_code||
              ' p_class='||:b1.p_class);
         report_job_id := RUN_REPORT_OBJECT(report_id);
              host('txt2htmlhpux '||:global.user_home_dir||f_file_name||' > '||:global.user_home_dir||html_file_name);
              web.show_document(:global.user_home_dir||html_file_name,'_BLANK');
    Thanks

    That is set correctly. All these applications were working fine. We only have this issue after re-building our development environment.
    I have personally run the application and noticed that there are error messages as well.
    When getting the report id from RUN_REPORT_OBJECT, the following error appears
    REP-0004: Warning: Unable to open user preference file.
    Immeditely followed by:
    REP-3002: Error initializing printer. Please make sure a printer is installed.
    Edited by: Rick777 on 20-Jan-2010 03:34
    Edited by: Rick777 on 20-Jan-2010 03:39

  • Vbscript RegRead function not behaving consistently and/or returning correct values when they exist in the registry

    Hello.
    I seem to be having a problem using the RegRead function within vbscript to return a simple value from the registry. When I run it on my workstation (windows 7 x64 sp1), it seems to miss certain registry values that are indeed there (specifically, I am looking
    for instances of "Adobe" in the displayName value of HKLM\Software\wow6432node\microsoft\windows\uninstall). However, when I run on a test VM, it returns the values fine. I am hoping someone might be able to explain this inconsistency and why it
    is happening.
    The code is very simple:
    On Error Resume Next
    if wscript.arguments.count < 1 then
    wscript.echo "usage: regread.vbs <hostname> <appname>"
    wscript.quit
    end if
    AppName = wscript.arguments(1)
    strComputer = wscript.arguments(0)
    const HKEY_LOCAL_MACHINE = &H80000002
    Set WshShell = WScript.CreateObject("WScript.Shell")
    Set objReg=GetObject("winmgmts:{impersonationLevel=impersonate}!//"& strComputer & "/root/default:StdRegProv")
    strKeyPath = "SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall"
    objReg.EnumKey HKEY_LOCAL_MACHINE, strKeyPath, arrSubKeys
    For Each subkey In arrSubKeys
    'wscript.echo subkey
    InstalledAppName = ""
    InstalledAppName = WshShell.RegRead("HKLM\" & strKeyPath & "\" & subkey & "\DisplayName")
    wscript.echo vbtab&"DisplayName: "&InstalledAppName
    if instr(InstalledAppName,AppName) > 0 then
    wscript.echo vbcrlf&"found"&vbcrlf
    end if
    Next
    When I run "cscript regread.vbs remoteHost Adobe" on my local machine, it does not "find" any instance of Adobe within the registry of machine "remoteHost". However, when I run it from a test VM, it does find the existing instances
    of Adobe within the DisplayName value of the uninstall key of the registry, here is the output from both, first the non-working one, then the working test VM.
    Non-working:
    Microsoft (R) Windows Script Host Version 5.8
    Copyright (C) Microsoft Corporation. All rights reserved.
    DisplayName:
    DisplayName:
    DisplayName:
    DisplayName:
    DisplayName:
    DisplayName: GPL Ghostscript 8.60
    DisplayName: GPL Ghostscript Fonts
    DisplayName:
    DisplayName:
    DisplayName:
    DisplayName:
    DisplayName:
    DisplayName: Microsoft Office Professional Plus 2010
    DisplayName:
    DisplayName:
    DisplayName:
    DisplayName: Microsoft ASP.NET 2.0 AJAX Extensions 1.0
    DisplayName:
    DisplayName: Sybase PowerBuilder 12.0 Standard Runtime
    DisplayName: MSXML 4.0 SP3 Parser
    DisplayName:
    DisplayName:
    DisplayName:
    DisplayName:
    DisplayName:
    DisplayName:
    DisplayName:
    DisplayName: MSXML 4.0 SP3 Parser (KB2758694)
    DisplayName: Microsoft Visual C++ 2008 Redistributable - x86 9.0.30729.4148
    DisplayName:
    DisplayName:
    DisplayName:
    DisplayName:
    DisplayName:
    DisplayName: Microsoft Windows Journal Viewer
    DisplayName: Java Auto Updater
    DisplayName: VBA (2627.01)
    DisplayName: Microsoft Visual C++ 2005 Redistributable
    DisplayName:
    DisplayName: Apple Software Update
    DisplayName: SQL Anywhere 9 for Windows x64
    DisplayName: Microsoft Office Professional Plus 2010
    DisplayName:
    DisplayName:
    DisplayName:
    DisplayName: Update for Microsoft Office 2010 (KB2553267) 32-Bit Edition
    DisplayName:
    DisplayName:
    DisplayName:
    DisplayName: Update for Microsoft Office 2010 (KB2760631) 32-Bit Edition
    DisplayName:
    DisplayName:
    DisplayName: Update for Microsoft Office 2010 (KB2494150)
    DisplayName:
    DisplayName:
    DisplayName:
    DisplayName:
    DisplayName:
    DisplayName:
    DisplayName:
    DisplayName:
    DisplayName:
    DisplayName: HKLM\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\{90140000-0011-0000-0000-0000000FF1CE}_Office14.PROPLUS_{9569DE03-1425-4D12-96EB-44D852AF759A}\DisplayName
    DisplayName:
    DisplayName:
    DisplayName:
    DisplayName: Update for Microsoft Office 2010 (KB2553065)
    DisplayName:
    DisplayName: Security Update for Microsoft Office 2010 (KB2598243) 32-Bit Edition
    DisplayName: Update for Microsoft Office 2010 (KB2825640) 32-Bit Edition
    DisplayName:
    DisplayName: Update for Microsoft Outlook Social Connector 2010 (KB2553406) 32-Bit Edition
    DisplayName: Security Update for Microsoft Office 2010 (KB2553371) 32-Bit Edition
    DisplayName:
    DisplayName:
    DisplayName:
    DisplayName: Security Update for Microsoft Office 2010 (KB2589320) 32-Bit Edition
    DisplayName:
    DisplayName:
    DisplayName:
    DisplayName: Update for Microsoft Office 2010 (KB2596964) 32-Bit Edition
    DisplayName: Update for Microsoft Office 2010 (KB2566458)
    DisplayName:
    DisplayName:
    DisplayName: Microsoft Office Access MUI (English) 2010
    DisplayName:
    DisplayName: Microsoft Office Excel MUI (English) 2010
    DisplayName:
    DisplayName: Microsoft Office PowerPoint MUI (English) 2010
    DisplayName:
    DisplayName:
    DisplayName: Microsoft Office Publisher MUI (English) 2010
    DisplayName:
    DisplayName: Microsoft Office Outlook MUI (English) 2010
    DisplayName: Update for Microsoft Outlook Social Connector 2010 (KB2553406) 32-Bit Edition
    DisplayName:
    DisplayName:
    DisplayName: Microsoft Office Word MUI (English) 2010
    DisplayName:
    DisplayName: Microsoft Office Proof (English) 2010
    DisplayName:
    DisplayName:
    DisplayName: Microsoft Office Proof (French) 2010
    DisplayName:
    DisplayName:
    DisplayName: Microsoft Office Proof (Spanish) 2010
    DisplayName:
    DisplayName:
    DisplayName:
    DisplayName:
    DisplayName:
    DisplayName:
    DisplayName:
    DisplayName:
    DisplayName:
    DisplayName: Microsoft Office Proofing (English) 2010
    DisplayName:
    DisplayName: Microsoft Office InfoPath MUI (English) 2010
    DisplayName:
    DisplayName: Microsoft Office Shared MUI (English) 2010
    DisplayName:
    DisplayName:
    DisplayName: Update for Microsoft Office 2010 (KB2553310) 32-Bit Edition
    DisplayName: Microsoft Office OneNote MUI (English) 2010
    DisplayName:
    DisplayName: Update for Microsoft OneNote 2010 (KB2553290) 32-Bit Edition
    DisplayName: Microsoft Office Groove MUI (English) 2010
    DisplayName:
    DisplayName: Microsoft Office Shared Setup Metadata MUI (English) 2010
    DisplayName:
    DisplayName:
    DisplayName: Microsoft Office Access Setup Metadata MUI (English) 2010
    DisplayName:
    DisplayName: Microsoft Office Visio Viewer 2003 (English)
    DisplayName: Cardiff TeleForm
    DisplayName:
    DisplayName:
    DisplayName: CodeMax Runtime Installer
    DisplayName: Microsoft .NET Framework 1.1
    DisplayName:
    DisplayName:
    DisplayName: Microsoft XML Parser
    DisplayName:
    DisplayName: Microsoft Visual C++ 2010 x86 Redistributable - 10.0.40219
    DisplayName:
    DisplayName:
    DisplayName:
    DisplayName:
    DisplayName:
    DisplayName:
    DisplayName:
    DisplayName:
    Working:
    Microsoft (R) Windows Script Host Version 5.8
    Copyright (C) Microsoft Corporation. All rights reserved.
    DisplayName:
    DisplayName:
    DisplayName:
    DisplayName: DYMO Label v.8
    DisplayName:
    DisplayName: GPL Ghostscript 8.60
    DisplayName: GPL Ghostscript Fonts
    DisplayName:
    DisplayName:
    DisplayName:
    DisplayName:
    DisplayName:
    DisplayName: Microsoft Office Professional Plus 2010
    DisplayName:
    DisplayName:
    DisplayName:
    DisplayName: Microsoft ASP.NET 2.0 AJAX Extensions 1.0
    DisplayName: Adobe Flash Player 11 Plugin
    found
    DisplayName: Sybase PowerBuilder 12.0 Standard Runtime
    DisplayName: MSXML 4.0 SP3 Parser
    DisplayName:
    DisplayName:
    DisplayName:
    DisplayName:
    DisplayName:
    DisplayName:
    DisplayName:
    DisplayName: MSXML 4.0 SP3 Parser (KB2758694)
    DisplayName: Microsoft Visual C++ 2008 Redistributable - x86 9.0.30729.4148
    DisplayName: Cisco WebEx Meeting Center for Internet Explorer
    DisplayName: Configuration Manager Client
    DisplayName: Java 7 Update 51
    DisplayName: Citrix Online Launcher
    DisplayName: MSXML 4.0 SP3 Parser (KB2721691)
    DisplayName: Microsoft Windows Journal Viewer
    DisplayName: Java Auto Updater
    DisplayName: VBA (2627.01)
    DisplayName: Microsoft Visual C++ 2005 Redistributable
    DisplayName: Microsoft Visual C++ 2005 Redistributable
    DisplayName: Apple Software Update
    DisplayName: SQL Anywhere 9 for Windows x64
    DisplayName: Microsoft Office Professional Plus 2010
    DisplayName: Update for Microsoft Filter Pack 2.0 (KB2810071) 32-Bit Edition
    DisplayName: Security Update for Microsoft Office 2010 (KB2826035) 32-Bit Edition
    DisplayName: Microsoft Office 2010 Service Pack 1 (SP1)
    DisplayName: Update for Microsoft Office 2010 (KB2553267) 32-Bit Edition
    DisplayName: Update for Microsoft PowerPoint 2010 (KB2553145) 32-Bit Edition
    DisplayName: Update for Microsoft Office 2010 (KB2589375) 32-Bit Edition
    DisplayName: Security Update for Microsoft Office 2010 (KB2687276) 32-Bit Edition
    DisplayName: Update for Microsoft Office 2010 (KB2760631) 32-Bit Edition
    DisplayName: Update for Microsoft OneNote 2010 (KB2810072) 32-Bit Edition
    DisplayName: Security Update for Microsoft InfoPath 2010 (KB2687422) 32-Bit Edition
    DisplayName: Update for Microsoft Office 2010 (KB2494150)
    DisplayName: Security Update for Microsoft Office 2010 (KB2687423) 32-Bit Edition
    DisplayName: Security Update for Microsoft Office 2010 (KB2597986) 32-Bit Edition
    DisplayName: Update for Microsoft Office 2010 (KB2794737) 32-Bit Edition
    DisplayName: Update for Microsoft SharePoint Workspace 2010 (KB2589371) 32-Bit Edition
    DisplayName: Security Update for Microsoft Publisher 2010 (KB2553147) 32-Bit Edition
    DisplayName: Security Update for Microsoft Office 2010 (KB2850016) 32-Bit Edition
    DisplayName: Definition Update for Microsoft Office 2010 (KB982726) 32-Bit Edition
    DisplayName: Security Update for Microsoft InfoPath 2010 (KB2760406) 32-Bit Edition
    DisplayName: Update for Microsoft Visio Viewer 2010 (KB2810066) 32-Bit Edition
    DisplayName: HKLM\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\{90140000-0011-0000-0000-0000000FF1CE}_Office14.PROPLUS_{9569DE03-1425-4D12-96EB-44D852AF759A}\DisplayName
    DisplayName: Update for Microsoft Office 2010 (KB2767886) 32-Bit Edition
    DisplayName: Update for Microsoft Office 2010 (KB2597087) 32-Bit Edition
    DisplayName: Security Update for Microsoft Office 2010 (KB2687510) 32-Bit Edition
    DisplayName: Update for Microsoft Office 2010 (KB2553065)
    DisplayName: Update for Microsoft Access 2010 (KB2553446) 32-Bit Edition
    DisplayName: Security Update for Microsoft Office 2010 (KB2598243) 32-Bit Edition
    DisplayName: Update for Microsoft Office 2010 (KB2825640) 32-Bit Edition
    DisplayName: Security Update for Microsoft Visio 2010 (KB2810068) 32-Bit Edition
    DisplayName: Update for Microsoft Outlook Social Connector 2010 (KB2553406) 32-Bit Edition
    DisplayName: Security Update for Microsoft Office 2010 (KB2553371) 32-Bit Edition
    DisplayName: Update for Microsoft Office 2010 (KB2826026) 32-Bit Edition
    DisplayName: Update for Microsoft Office 2010 (KB2589298) 32-Bit Edition
    DisplayName: Security Update for Microsoft Excel 2010 (KB2826033) 32-Bit Edition
    DisplayName: Security Update for Microsoft Office 2010 (KB2589320) 32-Bit Edition
    DisplayName: Security Update for Microsoft Word 2010 (KB2863902) 32-Bit Edition
    DisplayName: Security Update for Microsoft Office 2010 (KB2826023) 32-Bit Edition
    DisplayName: Update for Microsoft Office 2010 (KB2760598) 32-Bit Edition
    DisplayName: Update for Microsoft Office 2010 (KB2596964) 32-Bit Edition
    DisplayName: Update for Microsoft Office 2010 (KB2566458)
    DisplayName: Update for Microsoft Office 2010 (KB2589352) 32-Bit Edition
    DisplayName: Security Update for Microsoft Outlook 2010 (KB2837597) 32-Bit Edition
    DisplayName: Microsoft Office Access MUI (English) 2010
    DisplayName: Microsoft Office 2010 Service Pack 1 (SP1)
    DisplayName: Microsoft Office Excel MUI (English) 2010
    DisplayName: Microsoft Office 2010 Service Pack 1 (SP1)
    DisplayName: Microsoft Office PowerPoint MUI (English) 2010
    DisplayName: Microsoft Office 2010 Service Pack 1 (SP1)
    DisplayName: Update for Microsoft PowerPoint 2010 (KB2553145) 32-Bit Edition
    DisplayName: Microsoft Office Publisher MUI (English) 2010
    DisplayName: Microsoft Office 2010 Service Pack 1 (SP1)
    DisplayName: Microsoft Office Outlook MUI (English) 2010
    DisplayName: Update for Microsoft Outlook Social Connector 2010 (KB2553406) 32-Bit Edition
    DisplayName: Update for Microsoft Outlook 2010 (KB2687623) 32-Bit Edition
    DisplayName: Microsoft Office 2010 Service Pack 1 (SP1)
    DisplayName: Microsoft Office Word MUI (English) 2010
    DisplayName: Microsoft Office 2010 Service Pack 1 (SP1)
    DisplayName: Microsoft Office Proof (English) 2010
    DisplayName: Microsoft Office 2010 Service Pack 1 (SP1)
    DisplayName: Update for Microsoft Office 2010 (KB2850079) 32-Bit Edition
    DisplayName: Microsoft Office Proof (French) 2010
    DisplayName: Microsoft Office 2010 Service Pack 1 (SP1)
    DisplayName: Update for Microsoft Office 2010 (KB2850079) 32-Bit Edition
    DisplayName: Microsoft Office Proof (Spanish) 2010
    DisplayName: Update for Microsoft Office 2010 (KB2850079) 32-Bit Edition
    DisplayName: Microsoft Office 2010 Service Pack 1 (SP1)
    DisplayName: Update for Microsoft Filter Pack 2.0 (KB2810071) 32-Bit Edition
    DisplayName: Update for Microsoft OneNote 2010 (KB2810072) 32-Bit Edition
    DisplayName: Update for Microsoft SharePoint Workspace 2010 (KB2589371) 32-Bit Edition
    DisplayName: Microsoft Office 2010 Service Pack 1 (SP1)
    DisplayName: Update for Microsoft Office 2010 (KB2760598) 32-Bit Edition
    DisplayName: Update for Microsoft Office 2010 (KB2589352) 32-Bit Edition
    DisplayName: Microsoft Office 2010 Service Pack 1 (SP1)
    DisplayName: Microsoft Office Proofing (English) 2010
    DisplayName: Microsoft Office 2010 Service Pack 1 (SP1)
    DisplayName: Microsoft Office InfoPath MUI (English) 2010
    DisplayName: Microsoft Office 2010 Service Pack 1 (SP1)
    DisplayName: Microsoft Office Shared MUI (English) 2010
    DisplayName: Microsoft Office 2010 Service Pack 1 (SP1)
    DisplayName: Security Update for Microsoft Office 2010 (KB2553284) 32-Bit Edition
    DisplayName: Update for Microsoft Office 2010 (KB2553310) 32-Bit Edition
    DisplayName: Microsoft Office OneNote MUI (English) 2010
    DisplayName: Microsoft Office 2010 Service Pack 1 (SP1)
    DisplayName: Update for Microsoft OneNote 2010 (KB2553290) 32-Bit Edition
    DisplayName: Microsoft Office Groove MUI (English) 2010
    DisplayName: Microsoft Office 2010 Service Pack 1 (SP1)
    DisplayName: Microsoft Office Shared Setup Metadata MUI (English) 2010
    DisplayName: Microsoft Office 2010 Service Pack 1 (SP1)
    DisplayName: Microsoft Office 2010 Service Pack 1 (SP1)
    DisplayName: Microsoft Office Access Setup Metadata MUI (English) 2010
    DisplayName: Microsoft Office 2010 Service Pack 1 (SP1)
    DisplayName: Microsoft Office Visio Viewer 2003 (English)
    DisplayName: Cardiff TeleForm
    DisplayName: Adobe Acrobat XI Pro
    found
    DisplayName: QuickTime
    DisplayName: CodeMax Runtime Installer
    DisplayName: Microsoft .NET Framework 1.1
    DisplayName: WinZip 15.0
    DisplayName: McAfee VirusScan Enterprise
    DisplayName: Microsoft XML Parser
    DisplayName: McAfee Agent
    DisplayName: Microsoft Visual C++ 2010 x86 Redistributable - 10.0.40219
    DisplayName:
    DisplayName:
    DisplayName:
    DisplayName:
    DisplayName:
    DisplayName:
    DisplayName:
    DisplayName: Apple Application Support
    Does anyone know why this might be happening? The only main difference is that the machine that the script does not work on, has visual studio 2013 installed.
    Please help

    Well I think we can agree that it is not supported remotely. Because while it did initially work remotely, it didnt behave consistently; that is, it worked on the VM, but not my desktop. That's the whole reason I created this thread. Sorry if you are confused,
    but I most certainly was not lying and not trying to troll the forum or whatever it is you are insuinuating. Chill out a little bit and maybe you might get that Microsoft MVP.
    I am trying to get you t understand why what you are saying is wrong.  You may have thought it worked but there were a number of things that make it impossible to actually work.
    You were enumerating a remote key.  You were using that key name with RegRead and it was looking up the local value.  That is why it could not find remote keys and values.  The local and remote machines will not match on all keys.
    The correct call is the "GetStringValue" of the registry provider because it is the only call that can read remote values. My point is that you were fooling yourself by thinking that it ever actually worked.  If anything it was just dumb luck
    that the keys would match. 
    So maybe you weren't actually lying but you were surely foolingyourself and confusing us.
    Anyway - glad you fixed it and just remember to not mix calls like you did.  Also don't use On Error Resume Next unless you plan on test every call for an error.
    ¯\_(ツ)_/¯

Maybe you are looking for