How to return values in calls to subsequence?

I want to call a sous-suite. I pass parameters to this subsequence but I want too return values. Is it possible to return values other than using globals?

-Pat

Hello

You can set the parameter as "pass by reference". Right mouse click on the setting you are interested in and you will find this setting.

Concerning
Ray Farmer

Tags: NI Software

Similar Questions

  • How to return values from the record following instead of in the same record in LOV

    Hi all

    I use Forms 10 G.

    I have a block of details. In what in the 3rd column, I have a LOV.

    My requirement is let say I asked for it from the 1st and 2nd column, and it shows 1 record.

    After that if I pressed F9, then it should display the LOV list and, when I select a value any then it will create a new record with the same value of 1st and 2nd column.

    Example: -.

    Agenda provider country
    123ABCIndia

    We here in the column 'Country' LOV. Then when I pressed F9 then Lov should be displayed.

    as below.

    List of countries
    India
    U.S..
    Japan

    It works very well so far.

    Now if I select from the USA in the list then it should create a new record with the values of 1st and 2nd column.

    Agenda provider country
    123ABCIndia
    123ABCJapan

    How can I do this?

    Besically I need, rather than return the value in the same record, he must return to the next with the exsiting values record.

    The algorithm is:

    -use the KEY-LISTVAL about to 'COUNTRIES '.

    -LOV execution using builtin show_lov

    -store the return value Lov any parameter or a local variable in your trigger code ( vL_dummy_Deger varchar2 (100); )

    -Create registration

    -assign value to any new item you want to

    code like this:

    declare

    vLDummy boolean;

    vL_dummy_Deger varchar2 (100);

    Start

    -lov runs lov ruturns value is assigned to all the dummy elements to store Lov, return value. (no need to display)

    "-" DUMMY "point lets store lov, return value.

    vLDummy: = show_lov ('LOV_ULKE');

    --

    vL_dummy_Deger: =: model;

    create_record;

    : new_item: = vL_dummy_Deger;

    end;

  • How return values when the page of the ofa procedure call

    Hello

    I need to return multiple values in the OPS page calling procedure.i using below code.bt I'm able to return a single value. Please suggest me how to return multiple values.

    Co:

    -----

    If (pageContext.getParameter ("Calc")! = null) {}

    Vo1 OAViewObject = (OAViewObject) am.findViewObject ("AddonBillingVO");

    System.out.println ("VO");

    {if(VO1!=null)}

    CNT int = vo1.getRowCount ();

    System.out.println ("count:" + cnt);

    If (cnt > 0)

    {

    RowSetIterator rs = vo1.createRowSetIterator("empIterator");

    System.out.println ("EMP");

    If (rs! = null)

    {

    While (rs.hasNext ())

    {

    AddonBillingVORowImpl line = rs.next ((AddonBillingVORowImpl));

    System.out.println ("impl");

    If (line! = null)

    {

    String laseid = row.getAttribute("LeaseId").toString ();

    System.out.println (laseid);

    String billingid = row.getAttribute("AddonBillingId").toString ();

    System.out.println (billingid);

    [Serializable] param = {}

    laseid, billingid

    };

    String newupc = (String) am.invokeMethod ("callPLSQLProc", param);

    System.out.println (newupc);

    String myValue = newupc;

    OAMessageTextInputBean textBean = (OAMessageTextInputBean) webBean.findChildRecursive ("prorate");

    textBean.setValue (pageContext, myValue);

    }

    }

    AM:

    --------

    public String callPLSQLProc (String laseid, String billingid)

    {

    OracleCallableStatement callableStatement = null;

    Try

    {

    String callProc = "BEGIN LEASE_PRORATE_PKG. LEASE_PRORATE_PROC1 ' + '.

    "(p_lease_id = >: 1,» +)"

    ' p_billing_id = >: 2 +,

    "(p_prorate = >: 3) +;

    'END;';

    callableStatement (OracleCallableStatement) = getOADBTransaction ().createCallableStatement(callProc,1);

    callableStatement.setInt (1, Integer.parseInt (laseid));

    System.out.println (laseid);

    callableStatement.setInt (2, Integer.parseInt (billingid));

    System.out.println (billingid);

    callableStatement.registerOutParameter(3,OracleTypes.VARCHAR,255);

    callableStatement.execute ();

    String resultMessage = (String) callableStatement.getString (3);

    System.out.println (resultMessage);

    Return resultMessage;

    }

    catch (System.Exception e)

    {

    e.printStackTrace ();

    System.out.println ("execepn");

    throw new OAException (try (), OAException.ERROR);

    }

    printscreen.PNG

    Khalil.

    Hello

    You are the PL/SQL procedure in a loop on the right? Just assign the value to the attribute appropirate.

    if (pageContext.getParameter("Calc")!=null)  {
      OAViewObject vo1 = (OAViewObject)am.findViewObject("AddonBillingVO");
      System.out.println("vo");
      if(vo1!=null) {
      int cnt = vo1.getRowCount();
      System.out.println("count :" + cnt);
      if (cnt > 0){
      RowSetIterator rs = vo1.createRowSetIterator("empIterator");
      System.out.println("emp");
      if (rs != null){
      while (rs.hasNext()){
      AddonBillingVORowImpl row = (AddonBillingVORowImpl) rs.next();
      System.out.println("impl");
      if (row != null){
      String laseid = row.getAttribute("LeaseId").toString();
      System.out.println(laseid);
      String billingid=      row.getAttribute("AddonBillingId").toString();
      System.out.println(billingid);
      Serializable[] param = { laseid,billingid };
      String newupc = (String) am.invokeMethod("callPLSQLProc",param);
      System.out.println(newupc);
      //String myValue = newupc ;
      //OAMessageTextInputBean textBean = (OAMessageTextInputBean)webBean.findChildRecursive("prorate");
      //textBean.setValue(pageContext, myValue);
      row.setAttribute("Prorate",newupc);
      }
      }
      }
      }
      }
    }
    

    Check the last lines. If the attribute name is nothing else than "Pro rata", updated accordingly.

    See you soon

    AJ

  • How to get the return value of the method by calling the stored procedure in ApplModuleImpl

    Hello

    I use Jdev 10.1.3.4
    JSF, and ADF business components
    I created a service method in the implementing class of module request to execute the strored procedure in the database.
    This breeding returns a string value.
    now, I slipped the method of service of data control palette on my JSF page and chose ADF parameter form when I droped.
    It works very well.
    now, I want to display the string returned by the method of service after the execution on the JSF page as global messages.
    How can I achieve this.
    Help, please

    Thanks in advance

    Kind regards
    Ajit Agarwal

    Hello

    You must run programmatically run the method binding. If I'm not wrong then the following code will allow you to access the return value

    OperationBinding oper = bindings.get("MyPLSQLAccessMethodBinding") (OperationBinding);
    String returnValue = oper.execute ((String));

    Once you have the string in a managed bean you can add it to the stack of messages JSF exposed by the FacesContext

    Frank

  • Calling a function multiple return values...

    Hello

    I wrote a simple function 2 return values. It comes to my own understanding.

    create or replace function func1 (empid number)

    Return number

    is

    number of SAL;

    number of deptID;

    Start

    Select the wage in sal of employees where employee_id = empid;

    Select department_id from deptid from employees where employee_id = empid;

    return of sal;

    deptid return;

    end;

    I tried to call the function like below: -.

    declare

    number of performance(1);

    Result2 number;

    Start

    performance(1): = func1 (101);

    Result2: = func2 (101);

    dbms_output.put_line(result ||) '' || Result2);

    end;

    output:-1700 1700

    the salary was posted twice.

    I understand that the second query has not been taken into account.

    Please let me know how this can be achieved.

    Thanks and greetings

    Here is an example of functions Oracle return multiple values - dBforums:

    CREATE or REPLACE TYPE pmc_tab AS TABLE OF NUMBER;

    CREATE TABLE v_stats_daily (start_date date, number of Field1, Field2 number, field3 number);

    INSERT INTO v_stats_daily VALUES('08-OCT-2003',10,20,30);

    INSERT INTO v_stats_daily VALUES('08-OCT-2003',40,50,60);

    INSERT INTO v_stats_daily VALUES('08-OCT-2003',70,80,90);

    CREATE OR REPLACE FUNCTION PMC_STATS

    (pStatDate Date) IS BACK pmc_tab

    MyArray pmc_tab;

    NUMBER of vstat1;

    NUMBER of vstat2;

    NUMBER of vstat3;

    BEGIN

    MyArray: = pmc_tab();

    SELECT sum (Field1), sum (field2), sum (field3)

    IN vstat1, vstat2, vstat3

    OF v_stats_daily

    WHERE the arguments start_date = pStatDate;

    MyArray.EXTEND;

    MyArray (1): = vstat1;

    MyArray.EXTEND;

    MyArray (2): = vstat2;

    MyArray.EXTEND;

    MyArray (3): = vstat3;

    RETURN MyArray;

    END;

    /

    Set serveroutput ON

    DECLARE

    MyDate DATE;

    MyArray pmc_tab;

    I have SEVERAL;

    numOut NUMBER;

    BEGIN

    MyArray: = pmc_stats('08-OCT-2003');

    dbms_output.put_line (' number of Table: ' | to_char (myArray.Count));

    FOR i IN 1.MyArray.last LOOP

    numOut: = MyArray (i);

    -If numOut is null then

    dbms_output.put_line (' value: ' | to_char (numOut));

    -end if;

    END LOOP;

    END;

    /

    /

    Table number: 3

    Value: 120

    Value: 150

    Value: 180

    PL/SQL procedure successfully completed.

    /

    Post edited by: Elya

  • How to pass values from method to method of CO AM return?

    Hello

    On my personal page, I have a method in the AM. This method calls a PL/SQL package to get some values in the database.
    I need to return values to my CO thos where I called the AM method. How to do that.
    Already, I did the following:

    in CO


    String ledgerId = null;
    String ledgerName = null;
    String countedLedgers = null;
    String budgetVersionId = null;
    String budgetName = null;

    [Serializable] parameters = {ledgerId
    ledgerName
    countedLedgers
    budgetVersionId
    budgetName
    };

    OAApplicationModule am = pageContext.getApplicationModule (webBean);
    am.invokeMethod ("getLedgerData", parameters);


    in AM

    public void getLedgerData (String LedgerId
    String LedgerName
    String CountedLedgers
    String BudgetVersionId
    String BudgetName
    )
    throws SQLException
    {

    ......
    After call to PL/SQL
    ......
    After running you can get the value of a pl/sql block production
    ledgerId = callPLSQLStmt.getString (1);
    ledgerName = callPLSQLStmt.getString (2);
    countedLedgers = callPLSQLStmt.getString (3);
    budgetVersionId = callPLSQLStmt.getString (4);
    budgetName = callPLSQLStmt.getString (5);
    callPLSQLStmt.close ();

    System.out.println ("AM Ledger Info: ledgerId:" + ledgerId);
    System.out.println ("AM Ledger Info: ledgerName:" + ledgerName);
    System.out.println ("AM Ledger Info: countedLedgers:" + countedLedgers);
    System.out.println ("AM Ledger Info: budgetVersionId:" + budgetVersionId);
    System.out.println ("AM Ledger Info: budgetName:" + budgetName);

    LedgerId = ledgerId;
    LedgerName = ledgerName;
    CountedLedgers = countedLedgers;
    BudgetVersionId = budgetVersionId;
    BudgetName = budgetName;
    ....



    Thus, upon his return in the central, what should I do to get these values on 'settings [Serializable]", which I've provided?
    The end result should be to bring them to the screen...

    Thank you
    Ronny

    He is sure to get the values using the hash table.

    The AM procedure would be something similar to

    public HashMap getLedgerData (String pLedgerId)
    )
    Can be used get pLedgerIdto results... If you already know the value so no need for this parameter
    Run your PL/SQL
    HashMap ledgerDetailsHash = new HasnMap();
    ledgerDetailsHash.put ("LedgerId", value1);
    ledgerDetailsHash.put ("LedgerName", value2);
    ledgerDetailsHash.put ("CountedLedgers", value3);
    .......

    Return ledgerDetailsHash;
    }

    Your call to CO's going to be

    HashMap resultMap = (HashMap) am.invokeMethod ("getLedgerData", parameters, where applicable);
    String LedgerName = resultMap.get ("LedgerName");
    ......

    Kind regards
    Stephanie.

  • [JS CS4/CS5/CS5.5] How to get the return value from Javascript using doScript

    Hi all

    I'm calling javascript from COM (c#) and it works fine. Passing parameters to javascript and playback by using the syntax of the [x] arguments also works very well.

    What I can't seem to get to work is to know how to move something from javascript to the calling COM Summoner, in this case, c#. How and where should I place the return value in javascript?

    Thanks in advance.

    Rachiud

    doScript() evaluates an expression, so just make sure that your Javascript is an expression.

    For instance "(3 + 3)" 6 "

  • How to return two values of a function?

    Hi all
    I have a function which returns a varchar2 value. This value is used in the SQL of a ref cursor

    Now I want this function returns two values. I tried to use varray, but could not accomplish the task.

    Can you tell me how can I find the two values from a function? and how this function can be called in a SQL query?

    Thank you very much

    The query should look like:

    SELECT v.col.name AS name
         , v.col.flag AS flag
    FROM   ( SELECT kk_test_kk(t.somecolumn,t.someothercolumn,42) AS col
             FROM   sometable t ) v;
    

    Note that you need to prefix with the name of view inline ('v' in the example) and the expression of the function ('col' in the example).

  • How to use the return value of TestComplete (using COM) as a variable in the conditional statement (for example loops) TestStand

    Hello

    I have setup a COM interface for TestStand (TS) to run some scripts in TestComplete (TC).  Normally, when TestComplete has finished executing the script, it returns a 0 or 1 to designate the success/failure during the TestStand step (step test for example String value).  It worked well.

    However, now I need TestComplete to regain a vaule (e.g. 32) TS and TS need to assess this value in a while statement. So if the TC value is 32, I would have some statement in TS ike:

    While (return value! = 30)

    Do something...

    Thank you

    Jigg,

    No, the program does not have a new thread.  It's just a single sequential thread. She called other sequential files, and that's all.

    I think I'll have some luck with the StationGlobal.  It seems to work (for example by setting the StationGlobal a single sequence file automatically updates the Stationglobal in another movie file, sort of like passing the reference value)

    Thank you!

  • How the two function return values

    Dear all,

    Please explain, how the two values of function return?

    give a simple example.

    OK, a few examples...

    First example, using a type of structured on the database object:

    SQL > create or replace type tMyValues as an object (yr number, number, number of dy mn)
    2.

    Type of creation.

    SQL > create or replace function getMyValues return tMyValues is
    2 number of y: = extraction (year sysdate);
    number of 3 m: = extraction (sysdate months);
    number of 4 d: = extract (day of sysdate);
    5. start
    6 return new tMyValues(y,m,d);
    7 end;
    8.

    The function is created.

    SQL > set serverout on

    SQL > declare
    2 myValues tMyValues;
    3. start
    4 myValues: = getMyValues();
    5 dbms_output.put_line (' year: ' | myValues.yr);
    6 dbms_output.put_line (' month: ' | myValues.mn);
    7 dbms_output.put_line (' date: ' | myValues.dy);
    8 end;
    9.
    Year: 2015
    Month: 4
    Day: 1

    PL/SQL procedure successfully completed.

    Second example, using an associative array within PL/SQL:

    SQL > set serverout on
    SQL > declare
    2 type tMyValues is table of the index number to varchar2 (10);
    3 myValues tMyValues;
    4
    5 function getMyValues return tMyValues is
    6 retValues tMyValues;
    7. start
    8 retValues ('Year'): = extraction (year sysdate);
    9 retValues ('Month'): = extraction (sysdate months);
    10 retValues ('Day'): = extract (day of sysdate);
    11 return retValues;
    12 end;
    13. begin
    14 myValues: = getMyValues();
    15 dbms_output.put_line (' year: ' | myValues ('Year'));
    16 dbms_output.put_line (' month: ' | myValues ('Month'));
    17 dbms_output.put_line (' date: ' | myValues ('Day'));
    18 end;
    19.
    Year: 2015
    Month: 4
    Day: 1

    PL/SQL procedure successfully completed.

    For the pipeline functions, see the example I wrote on the link provided by ReemaPuri (answer No. 3) that I don't need to re - write what I did before.

  • How to set the return value of the method to the /outputText inputText field

    Hello

    How to set output return value method of a /outputText adf inputText field

    Concerning

    sevanan

    Well put method's return value to a managed bean variable.

    Create a variable in the bean and set the return value to this variable.

    the inputText and outputTextValue to this managedBean.variable value

    That's all...

    and add partial trigger for inputText programmaticly

  • How to get the return value of the activity of the method in the stubborn workflow

    Hi all

    I use Jdeveloper 11 g R2 (11.1.2.3) & Weblogic 10.3.5.0

    I have a stubborn workflow, default activity is a call method than calling a method in the app module
    This method returns an id

    I need this code in my project to do something else
    Is there a way I can access the return value of the method call activity?

    Concerning
    Mohsen

    Set the value of return as #{{pageFlowScope.myBean.returnValue} pageFlowScope.myBean.returnValue} in the method, call the property inspector and get the value in your managed bean.

    String returnParam = (String) JSFUtil.getFromPageFlow ("returnValue");

  • vmrun return value? How to tell a script execution vmrun host-side errors?

    Host: MacBookPro, OSX 10.4.11, core 2 duo, 2 GB ram

    Client: Windows XP with service pack 3 installed

    Apart from something like this:

    if vmrun -T fusion -gu Administrator -gp pass copyFileFromGuestToHost /Users/me/Documents/Virtual\ Machines.localized/Windows\ XP\ Professional.vmwarevm/Windows\ XP\ Professional.vmx "c:\CyberExtruder\Flixor\dst\im_mesh.obj" /Users/me/fromVMWareWin32/im_mesh.obj &> /dev/null; then returnValue=0; else returnValue=1; fi
    

    Where I create a return value for vmrun of the existence of an exit error message... Another way to know if a call to vmrun succeeded?

    Although I am simply called copyFileFromGuestToHost in this example, I'm working on a side script host running several programs on the client that may fail. I can tell if they fail for lack of output files, so if a fails to CopyFileFromGuestToHost I know that just called comments executable failed.

    Advice?

    The standard * NIX is to return error codes via the variable $ shell? Thus, for example:

    etung$ /Library/Application\ Support/VMware\ Fusion/vmrun list
    (output omitted)
    etung$ echo $?
    0
    etung$ /Library/Application\ Support/VMware\ Fusion/vmrun something-that-doesnt-exist
    Error: Unrecognized command: something-that-doesnt-exist
    etung$ echo $?
    255
    
  • How to fill in the right side of the shuttle with display/return values?

    Hello

    I know, the right way to fill in the right side of the shuttle's only:
    declare
         v_list     apex_application_global.vc_arr2;
    begin
         select profile_name return_value
           bulk     collect
           into     v_list
           from     user_profiles
          where     user_id = :p61_user_id;
    
         return (apex_util.table_to_string (v_list));
    end;
    It is comfortable for the user to see the name of the profile.
    However, I need a profile_id as return value, as I have on the left side of the shuttle.

    The left side of the shuttle is filled with a selection list with display/return values, as you know.
    I need both sides of the shuttle to return profile_id in order to create a merger.

    How is it possible to fill the right side of the shuttle with display/return values?

    Make a selection list on the left side of the shuttle to return profile_name as return value as well.
    In this way, the two parts of the shuttle will return the same value, which could be used as a State of fusion.

  • How to get the return value from Java runtime.getRuntime.exec?

    I am running shell from a (GR 11, 2) Oracle database commands on aix.
    But, I would get a return value of a shell comand... as you get with "echo $?"

    I use a code like
    CREATE OR REPLACE JAVA SOURCE NAMED common."Host" AS
    import java.io.*;
    public class Host {
      public static int executeCommand(String command) {
        int retval=0;
        try {
            String[] finalCommand;
            finalCommand = new String[3];
            finalCommand[0] = "/bin/sh";
            finalCommand[1] = "-c";
            finalCommand[2] = command;
    
          final Process pr = Runtime.getRuntime().exec(finalCommand);
          pr.waitFor();
    }
       catch (Exception ex) {
          System.out.println(ex.getLocalizedMessage());
          retval=-1;
        }
        return retval;
    };
    /
    but I do not get a return value... because I don't know how to get the return value...

    Published by: user9158455 on 22-Sep-2010 07:33

    Hello

    Your pr.exitValue () has tried?

    I think you also need a finally block that destroys the sub-process

    Concerning
    Peter

Maybe you are looking for