Passing values to OnDemandProcess from Select Statement on Reports Page

I think I'm just missing some of the proper syntax, Can somebody please help me.
As I've come to understand this process of passing the values,
I recognize it as (3) steps.
1. Referencing the "javascript" in the Select Statement of the Reports Page.
2. Including the "javascript" in the Page Header region.
3. Defining the Process as an OnDemand Application Process.
My problem is:
a. I can't seem to get the Value passed to the Application Process.
b. I don't know how to reference the Value passed once I get it passed.
Here's what I've got done so far:
1. (The Select Statement)
   onClick="javascript:ORDER_CONNECT_SEQUENCE('||ID||')
{code}
2. (The javascript)
{code}
function ORDER_CONNECT_SEQUENCE('+ID+')
var get = new htmldb_Get(null,$x('pFlowId').value,'APPLICATION_PROCESS=ORDER_CONNECT_SEQUENCE',0);
get.add('+ID+');
gReturn = get.get('+ID+');
{code}
3. (The Application Process)
{code}
   BEGIN
   Select '+ID+' into THIS_CIRCUIT from dual;
{code}
I Know that the Application Process is being referenced and that the OnClick routine is working properly,
because if I plug a Value into the Application Process, instead of using '+ID+',
Then I get all of my desired results.
Any help you can give me here is greatly appreciated.
Thanks- Gary                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

Dimitri, Thanks for your efforts here, but its still not working for me.
Here's what I understand from your suggestions:
1. (changes to the javascipt)
   a. replace function ORDER_CONNECT_SEQUENCE('+ID+')
       with
       function ORDER_CONNECT_SEQUENCE(pId)
   b. replace get.add('+ID+')
       with
       get.addParam('x01',pId)
   c. replace getReturn = get.get('+ID+')
      with
      getReturn = get.get()
      get = null2. (chages to the Application Process)
   a. add l_value varchar2(4000) to my list of declarations
   b. add l_value := wwv_flow.g_x01 below the begin statement
   c. I guess then I would reference the l_value like this:
       Select l_value into THIS_CIRCUIT from dual* Also, You didn't mention any changes in my Select statement in the Reports region of the page.
FYI.
  onClick="javascript:ORDER_CONNECT_SEQUENCE('||ID||')
{code}
  The 'ID' which I'm referencing here is an ID from the table which I'm querying.
Am I misunderstanding you somewhere?
Thanks- gary                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

Similar Messages

  • How can I call a Page Process from the Select statement for Report Page

    I'm able to call a javascript using the below:
    img src="#IMAGE_PREFIX#add2.gif" border="0" alt="Icon 4" onClick="javascript:add_connect1('||CPORT.ID||')"
    But Now,
    I'd like to accomplish (2) New things:
    1. instead of using,....... onClick="javascript:add_connect1,
    I'd like to call a Page Process, onClick=
    2. I'd like to be able to call two different processes onClick.
    a. onClick="javascript:passBack('||ID||')"
    b. onClick= <Please see my question #1 above>
    Can someone please help me with the syntax for this,
    If indeed it can even be done?
    Thanks- Gary

    Greg.
    It seems that my situation is the one you describe in you second paragraph, where you mention:
    you could then add the ID column value as a parameter to the javascript functionBut,
    I do not know how to reference the variable in my javascript nor how to use it in my on-demand process.
    If you can hellp me past this last little bump, then I think I will be able to use these skills in Sooo many different areas of my design.
    Here's what I've got so far:
    A. In the select statement I identify the javascript as:
    onClick="javascript:connect_port('<font color=blue>''||ID||''</font>')";
    B. In my javascript I have this:
    <script language="JavaScript" type="text/javascript">
    function connect_port(ID)
    var get = new htmldb_Get(null,$x('pFlowId').value,'APPLICATION_PROCESS=CONNECT_PORT',0);
    gReturn = get.get();
    get = null;
    </script>
    C. In my on demand function I have this:
    BEGIN
    INSERT INTO CCONNECTIONS_B
    BLDG_ID,CLST_ID,PORT_ID,STRAND_ID
    ) VALUES
    :P2004_BLDG_ID,:P2004_CLST_ID,:P2004_PORT_ID,:P2004_STRAND_ID1
    END;
    You can see that I dont know how to use the value for 'ID' in either the javascript or the On-Process function.
    If you can help me out with this one, Then I can imitate it for the rest.
    -Gary
    Edited by: garyNboston on Apr 3, 2009 6:44 AM
    Edited by: garyNboston on Apr 3, 2009 6:44 AM
    Edited by: garyNboston on Apr 3, 2009 6:45 AM
    Edited by: garyNboston on Apr 3, 2009 6:47 AM

  • Passing values to FM froma selection screen

    Hi Guys,
    I have a selection screen in which i have 'From' and 'To' input fields.Also using multiple select button i can select discrete values.In the function module they have a table type in the import param.
    Is it possible to send the  values within the range plus the discrete values selected? If yes, then please help.
    Thanks,
    tubai.

    Hi,
    You can below code:
      DATA: rt_ranges TYPE REF TO data.
      FIELD-SYMBOLS:  <fs_select> TYPE table,
                                <fs_wa>  TYPE ANY,
                                <fs_wa1> TYPE ANY.
      DATA: lt_select  TYPE TABLE OF rsdsselopt,
                wa_sel_opt TYPE rsdsselopt.
    Retrieve the data from the select option
      rt_ranges = wd_this->w_handler->get_range_table_of_sel_field(
                               i_id = 'SELECT' ).
    Assign it to a field symbol
      ASSIGN rt_ranges->* TO <fs_select>.
      IF NOT <fs_select> IS INITIAL.
        LOOP AT <fs_select> ASSIGNING <fs_wa>.
          ASSIGN COMPONENT 'SIGN' OF STRUCTURE <fs_wa> TO <fs_wa1>.
          lwa_sel_opt-sign = <fs_wa1>.
          ASSIGN COMPONENT 'OPTION' OF STRUCTURE <fs_wa> TO <fs_wa1>.
          lwa_sel_opt-option = <fs_wa1>.
          ASSIGN COMPONENT 'LOW' OF STRUCTURE <fs_wa> TO <fs_wa1>.
          lwa_sel_opt-low = <fs_wa1>.
          ASSIGN COMPONENT 'HIGH' OF STRUCTURE <fs_wa> TO <fs_wa1>.
          lwa_sel_opt-high = <fs_wa1>.
          APPEND lwa_sel_opt TO lt_select.
        ENDLOOP.
      ENDIF.
    You then pass lt_select to your FM.
    Regards,
    Priya

  • How to pass rowtype argument to a function from select statement?

    Hi all!
    I have function that takes mytable%rowtype as in parameter. can I pass entire row of mytable to the function from select statement? kind of
    select myfunction(mytable.*) from mytable where ....
    Thanks in advance

    The function can be used in a SQL statement only if it accepts SQL types and returns SQL type. %ROWTYPE being PL/SQL construct and not a SQL datatype, can not be used in this context.
    http://download-west.oracle.com/docs/cd/B14117_01/server.101/b10743/datatype.htm#i2093

  • How to find the number of fetched lines from select statement

    Hi Experts,
    Can you tell me how to find the number of fetched lines from select statements..
    and one more thing is can you tell me how to check the written select statement or written statement is correct or not????
    Thanks in advance
    santosh

    Hi,
    Look for the system field SY_TABIX. That will contain the number of records which have been put into an internal table through a select statement.
    For ex:
    data: itab type mara occurs 0 with header line.
    Select * from mara into table itab.
    Write: Sy-tabix.
    This will give you the number of entries that has been selected.
    I am not sure what you mean by the second question. If you can let me know what you need then we might have a solution.
    Hope this helps,
    Sudhi
    Message was edited by:
            Sudhindra Chandrashekar

  • Passing values to a dynamic selection screen via a report

    Hi,
    I have the following problem and need to seek your expertise urgently.
    In my program, I need to call another report by passing in parameters to the selection screen of other report. However, I could not pass values into a dynamic selection screen. I tried to use submit (report) with free selection but do not know how it works.
    Currently, I tried calling the function RS_REFRESH_FROM_DYNAMICAL_SEL and FREE_SELECTIONS_RANGE_2_EX. Using the object the first function has returned to me, I tried to append values such as fieldname etc to it. However, I realised the field names of a dynamic selection screen keeps changing. So I would not know how to pass a particular value to a selection field.
    Appreciate any help given.
    Thanks,
    CK

    Hello CK,
    Are you using logical database in your selection screen program attributes? If it is, look at include file DBxxxSEL for parameter named xxxDYNSE where xxx = logical database. Debug the program that has that dynamic selection, and look at field xxxDYNSE. This should give you a hint on how to populate the parameter when you submit the program.

  • How to passing value into Captivate from html?

    How to passing value into Captivate from html?
    Or
    How to communicate between objects in one slides?

    Hi czhao0378 and welcome to the forums!
    Captivate does not natively allow you to communicate your own
    data, either internally or externally. The only way to make this
    happen is to create your own functionality, either via custom-built
    Flash objects or JavaScript code executed in the browser or a
    combination of both.
    The only example I've seen of any "data passing" inside
    Captivate is a custom text input/output solution that was posted on
    the Captivate Developer Exchange:
    http://www.adobe.com/cfusion/exchange/index.cfm?event=extensionDetail&loc=en_us&extid=1253 021
    This solution consists of an input box that takes information
    from the user on one slide and a second box that displays that
    information on another slide. The functionality was built in Flash
    and is embedded in Captivate as a Flash "animation". Unfortunately,
    since this is a custom functionality, the information is not
    included in the user completion results Captivate can pass to a
    Learning Management System.
    Since the solution mentioned above relies on a Flash
    Actionscript variable to hold the information that is displayed,
    you can also pass the information from HTML to Captivate using the
    "SetVariable" command in JavaScript. This would at least allow you
    to display your own HTML-based data inside Captivate.
    Beyond that, I'm not aware of any other way to gather and
    pass data in Captivate.

  • How do I stop my cursor from selecting things on the page? It shows up like I want to type something and when I press the down key it goes through all the words like its a word document.

    How do I stop my cursor from selecting things on the page? It shows up like I want to type something and when I press the down key it goes through all the words like its a word document.
    == This happened ==
    Every time Firefox opened
    == June 27, 2010

    You have '''caret browsing''' enabled - that preference appears as set in your Troubleshooting Information.
    http://kb.mozillazine.org/Accessibility.browsewithcaret
    Hit the '''F7''' key to disable '''''caret browsing'''''.

  • Unable to pass report column value to url in select statement. Please help

    Hi all,
    I am trying to pass the report column value as follows:
    select key, num,
    case when Attachmentcnt(KEY) != 0 then
    'f?p=&APP_ID.:91:&SESSION.:'' '':NO::P91_KEY,P91NUM,P91_PREVPG:'And I am passing values as follows:
    {noformat}
    '#KEY#,'#NUM#','9' ELSE null
    END Attachment
    from tableA
    {noformat}
    But, I am not able to figure out correct sysntax to pass these column values. Can anyone give me some help. I appreciate it.
    rgds,
    Suma.
    Edited by: sumak on Jun 23, 2009 12:11 PM
    Edited by: sumak on Jun 23, 2009 12:22 PM

    Suma,
    If you're trying to generate a column with a URL, try something like the following:
    select key, num,
    case when Attachmentcnt(KEY) != 0 then
    'f?p=&APP_ID.:91:&SESSION.:'' '':NO::P91_KEY,P91NUM,P91_PREVPG:'
    || tableA.key || ',' || tableA.num || ',' || :P91_PREVPG
    else NULL
    end
    FROM tableA;
    But the best way to pass these would include checksum values against the values of your parameters (to make sure a user doesn't hack them). You'll need to check the Apex User manual for details - See "Understanding Session State Protection".
    Good luck,
    Stew

  • Storing variable from select statement

    I need to store a variable from a select statement into a session. Before I was taken what was passed from another page and throwing it into a session.--
    String Password= request.getParameter("Password");
    String sql = "Select WEB_USER_ID FROM Web_User WHERE PASSWORD = '" + Password +"'";
    session.setAttribute("USER",Password);
    Now though I need to put in Web_User_Id and cannot find the proper syntax. Can someone help
    session.setAttribute("User",???????);

    WEB_USER_ID is unidentified because it is a column name, not a variable name. You should first assign its value to a variable and then put the variable name into the setAttribute statement instead.
    Your query may return more than one result based on the way it is written. It sounds like you are trying to find all users with a password that is equal to the value of Password. If this is correct, then are you trying to create an attribute for each user?
    If your intention is to locate a user, then the user id and password should have been provided. A variable should be defined for both the password and user id. You should then add the user id to the where clause. After a successful search, the attributes can be created using the same syntax.

  • How: making column value as column of select statement

    Hi
    Quickly I have searched in this forum for following solution but not able to find it.
    I need to make a query in such a way that the value of one column in one table should act as a column-name of another table
    Eg:-
    tab1
    col1,col2,*col3*,col4
    tab2
    col11 col22 col33 col44
    row1 a b col3 d
    row2 aa bb cc dd
    So the query should be something like --- in row2 if the value is col3 then from tab1 I should pick the col3 in select statement (basically there will be some join in tab1 and tab2 )
    Hope I am able to make u all understand my query.
    regards

    Hi all,
    Sorry for late response.Just now I checked all the replies.
    Actually I tried in this way.
    CREATE OR REPLACE function Proc_caption (in_tan varchar2, in_order in number)
    return varchar2
    is
    d varchar2(100) ;
    begin
    SELECT col1 into d
    from tab1
    Where
    col2 = in_tanid
    AND col3 = 'Y'
    AND col4 = in_order ;
    return d ;
    Exception
    WHen No_DATA_FOund then
    return 'N' ;
    end ;
    create or replace procedure proc_generate_view(in_tan varchar2, in_soc varchar2)
    is
    x varchar2(2000);
    v4 varchar2(50) ;
    v5 varchar2(50) ;
    cnt number ;
    begin
    v4:= PROC_Caption (in_tan,4) ;
    v5:= PROC_Caption (in_tan,5) ;
    x := ' Create view v_generate as '
    || ' SELECT a , b, c, d ' ;
    if v4 <> 'N' THEN
    x := x || ' , ' || PROC_Caption (in_tan,4) || ' as Caption4 ' ;
    end if;
    if v5 <> 'N' THEN
    x := x || ' , ' || PROC_Caption (in_tan,5) || ' as Caption5 ' ;
    end if;
    x := x || ' FROM tab2 WHERE col1 = ''' || in_socid || ''''
    || ' AND col2 = ''' || in_tan || '''' ;
    select count(1) into cnt from USER_OBJECTS where OBJECT_NAME = 'V_GENERATE'
    and OBJECT_TYPE = 'VIEW' ;
    if cnt > 0 then
    EXECUTE IMMEDIATE ' DROP view V_GENERATE' ;
    END IF ;
    execute immediate x ;
    end ;
    NOTE:- I have just renamed the table name and column names in order to make it non confedential...
    I have created this successfully with actual table name and column names and able to get the result as per my requirement.
    regards

  • Calling PL/SQL code from Select statement

    Hi
    I have a PL/SQL function to calculate a value.
    create or replace procedure "SR_GROSS_MARGIN"
    (netsales IN NUMBER,
    margin IN NUMBER,
    GM OUT NUMBER)
    is
    BEGIN
        IF NETSALES = 0 THEN
           GM := 0;
        ELSIF
           NETSALES < 0 THEN
           GM := 0;
        ELSE
           GM := NETSALES / MARGIN;
        END IF;
    END;How do I call this from a SELECT statement?
    Regards
    Adam

    here you go:
    create or replace function SR_GROSS_MARGIN
    (netsales IN NUMBER,
    margin IN NUMBER)
    return number
    is
    gm number;
    BEGIN
        IF NETSALES = 0 THEN
           GM := 0;
        ELSIF
           NETSALES < 0 THEN
           GM := 0;
        ELSE
           GM := NETSALES / MARGIN;
        END IF;
    return gm;
    END;then you can:
    select gm(2500,20) from dual;

  • Need to return only one record from select statement.

    Hello friends,
    I have a scenerio in which code only want to fetch one value from the SQL statement, but in some cases the statment return more then one row due to which ORA-01422 : Exact fetch return more then one row, error comes.
    Can you suggest me to write a select statement that will handel this. I am using the below mentioned select statement:
    EXECUTE IMMEDIATE
    'SELECT rsdn FROM ' || schema || '.table_name' ||
    ' WHERE a = :1 AND b = :2 AND c IN (32,33,34)'
    INTO v_rsdn USING v_a, v_b;
    One question, Can I use Rownum < 2 in Where clause to restrict the select output to only one record ? Please suggest ?
    Regards,
    Rajat

    Well, if rownum=1 could be a trash answer, it would be an issue since we don't know which record you are interested to. Is it one particular ? Is it only to workaround the issue ? Then you may want to manage some BULK COLLECT or whatever else array to receive all the rows as well.
    What are you doing with the rows returned ?
    Nicolas.

  • Dynamic internal table from SELECT - statement ?

    Hi, is it possible to define an internal table just after a select statement is executed so that this internal table holds all the data that come back from the statement ?
    thanks in advance,

    Check the link -
    Re: Create Dynamic internal table
    Regards,
    Amit

  • Passing values to Jframe from JApplet

    Hi All,
    i need to open a frame when someone clicks on some particular part of an applet. also, i need to pass some values to that frame based on the region selected.
    Previusly i m doing it through showDocument method which calls a JSP which in turn calls the applet that i m trying to change as a frame now.
    Help please.
    Liza

    just to make things more clearer... i was passing values as querystring to JSP which passes them to an applet through parameter tags.
    Liza

Maybe you are looking for