Passing sql report query field value to hidden item in javascript

I have sql report which has in each row one html button. Let us say that query SHOULD look like (two columns, to be easy to get the point):
select 1 SECURITY_ID
  , '<input type="BUTTON" value="Top10" onClick="javascript:Top10Click ('||SECURITY_ID||');" >' BTN
FROM DUAL;
function Top10Click (vValue) {
  html_GetElement('P31_PROCESS_VALUE').value = vValue;
  doSubmit('GO_BACK');
} <br><br>
where P31_PROCESS_VALUE is hidden item where i want to store value of row where click happened.
<br><br>
In every button i want to pass row value "SECURITY_ID" to Top10Click function for each row differently.
<br><br>
Problem is that when I place double qoute then js is not working, else js is ok but "SECURITY_ID" is passed as constant not as live SQL value.
<br><br>
Any help...THX!
<br>
Demo is on oracle:
http://htmldb.oracle.com/pls/otn/f?p=26216:1
Workspace entry:
WK: FUNKY
UN: [email protected]
PW: qwertz

I have tried to unify the solution, so it looks like:
select 1 SECURITY_ID
  , '<input type="BUTTON" value="Top10" onClick="javascript:Top10Click ('||'&quot_X;'||SECURITY_ID||'&quot_X;'||');"  >' BTN
FROM DUAL;change '&quot_X;' (remove "_X" part ... so it can be seen in HTML properly!
THX Denes for great ideas...

Similar Messages

  • Javascript: set value of hidden item

    Hi,
    I have a select list and a hidden item on my page, after select a value, I want to write this value (and a little bit more) to the hidden item.
    So I have done the following...
    applied to page html header:
    <script language="JavaScript" type="text/javascript">
    function setExpress(item_id)
    html_GetElement('P230_HIDDEN').value = 'Test ' + html_GetElement(item_id).value;
    </script>
    and in selection list I set the HTML Form Element Attributes to onChange="setExpress(this.id); .
    But nothing is written to the hidden item. When I make it a text field it works correct.
    Isn't it possible to set a value of hidden item by javascript? Is there another way to do this (without computation)?
    Thanks for help
    chrissy

    Hello chrissy,
    I don't see the connection between the item being Hidden or Text. The item id stays the same, and so the JavaScript reference to it.
    It is possible to assign values to hidden items using JavaScript, just as you did. In the following page - http://htmldb.oracle.com/pls/otn/f?p=22814:8
    -you can see a working example of your situation – select list populate a hidden item, then display by using alert.
    After selecting from the list you should TAB out, so it will fire the JavaScript event. In your example, you were using onChange. I think that could be problematic in cases were the default value (first value) of the select list is the one chosen – no change there. In my example, I'm using onBlur.
    You can see the JavaScript on the source page.
    Hope this help,
    Arie.

  • How To Use a Hidden Page Item within an SQL Report Query without Submitting

    Hi,
    Using: Oracle ApEx 3.0.1
    I have an sql report region that contains a hidden page item as part of the "where clause". My problem is, based on a value entered by the user, I need to assign this value enetered to my hidden item, so that it can be used within the where condition of my sql but this would need to be done without actually submitting the form.
    At the moment, I can set the value via an on-demand process but my SQL is still not returing any values as the hidden page item within the query is not set (as page has not been submitted).
    Can anybody please assist as I am not sure how to do this and whether in actual fact, this is possible to do, without having submitted the page.
    Thanks.
    Tony.
    Edited by: Tony F. on Nov 12, 2011 1:39 AM

    You can set a session value using a dummy ajax call e.g:
    Add the following to the 'Function and Global Variable Declaration' region
    function f_set_item(pThis){
      var get = new htmldb_Get(null,&APP_ID.,'APPLICATION_PROCESS=dummy',1);
      get.add('P1_ID',pThis.value)
      gReturn = get.get();
      get = null;
    }Where P1_ID is the session value to be set. Then call the function in the usual way e.g.
    javascript:f_set_item(this);
    I hope that helps
    Shunt

  • Get item value of hidden item in java script on standard report

    I've a report with following query:
    select "ROWID",
    "GTEMPDETAILID",
    "GTEMPID",
    "NORMTEXT",
    "ITEMTYP",
    "ITEM",
    "BEMERKUNG"
    from "#OWNER#"."ALAVIS_GTEMPDETAILS"
    Item GTEMPDETAILID is hidden (set in column attributes).
    I defined an onclick event in the report template to set the value of GTEMPDETAILID into a Page item. This works, if the GTEMPDETAILID is not hidden. But how can I get the value of an hidden item in javascript?

    I am guessing this hidden value is not a protected item because youre manipulating the value. How about setting is a textfield but inside the "HTML form element" property, specify style="display:none;" or you can nest <script type="text/javascript">$x_Hide("ID_OF_TEXTFIELD");</script> in the page somewhere...
    Question, have you tried using $x_Value('ID_OF_ITEM','VALUE_OF_ITEM') ? this is APEX javascript API
    you can also use $x('ID_OF_ITEM') to retrieve DOM object, or $v('ID_OF_ITEM); to retrieve item values.
    Let me know if you need additional assistance.
    Edited by: srbonham1 on Jul 27, 2012 4:31 PM

  • Passing SQL Server identity attributes values into adf entity objects

    Hi all.
    I'm using Jdeveloper 10g for developing an ADF Swing application based on MS SQL Server DB.
    Does anyone know if it is possible to pass SQL Server identity attributes values into the correspondent attrributes of adf entity objects, like we do with Oracle DB Sequence.
    The problem is that i should somhow implement cascade deleting of detail view objects, so i should use the composition association. But since i cant fill the primary key attribute with appropriate value (that is actually a ms sql server db sequence value) i always get
    the following exception: oracle.jbo.InvalidOwnerException: JBO-25030 as i try to create a new pair of master/detail objects.
    Thanks in advance.
    Alex.

    The approach is good. but i still dont understand how i can address the sql server db sequence (identity field) programmatically...
    The code offered
    SequenceImpl sequence = new SequenceImpl("PRODUCTS_SEQ",getDBTransaction());
    setProdId(sequence.getSequenceNumber());
    generates something like this:
    select deq_name.nextval from dual
    but this syntax works for oracle only... and not for sql server...
    Edited by: Timin on Mar 26, 2009 6:34 AM
    Edited by: Timin on Mar 26, 2009 10:25 AM

  • How to access the value of application item in javascript

    How to access the value of application item in javascript?

    Hi,
    One way
    var myVariable = '&MY_APP_ITEM.';Br,Jari

  • Report parameter field value has a single quote. need to escape before pass

    Report has a parameter whose value might have a single quote in it. If I pass that value directly into the SQL Command... like
    where ... user_name = {?parm_user_name}...
    which would translate to
    user_name='O'Donnel Honda'
    I am getting an error... so would like to convert this parameter value into 'O''Donnel Honda' before passing into the query.
    I created a formula called parse_user_name with following:
    Replace ({?parm_user_name}, "'", "''")
    And used in the query like
    where ... user_name = {@parse_user_name}...
    I am getting an error like invalid SQL92 character...

    I think you should use the condition like this
    where ... user_name = '{?parm_user_name}'
    keep the parameter in single quote at the command level itself.
    Now use the same formula like
    replace({?Parameter},"'","''")
    This works only if the parameter is a single value parameter but not multi value parameter.
    Regards,
    Raghavendra

  • Dynamic Reports. Runtime parameter passing to Report Query.

    Hi everyone,
    I have developed a report using apex shared components (report query and report layout) along with BI Publisher for report printing in pdf format. the Report template is built using Template Builder for Word. I have configured my Apex4.1 env with BI Publisher 11.
    This report is working fine for hardecode ID ( like REQUEST_ID=10 ).
    to make report dynamic i have made following additions in the report
    I have added
    where clause in report query as WHERE REQUEST_ID = :REQUEST_ID (:REQUEST_ID is the text field in my page).
    Added a text field names :REQUEST_ID to get user input at run time.
    Create a button and add Repot Query URL in its properties.
    When i run the report with some valid value in :REQUEST_ID text field  i did not get expected result infect there is no record getting displayed in the PDF file.
    i think this is not the write way to do this but interestingly im not getting any error.
    please can someone guide me that how can i get this functionality in apex this way or the other ?
    Best Regards.

    Hi,
    the online help will help you on how to build a parameter list at all. For your desired functionality, all you need to do is to have the user pressing a button after he selected the parameters he want to assign values to and then create the parameter list in a PSLQL program unit in Forms.
    Frank

  • Please Help - SQL Report long column value required in a separate cell

    Hi.
    I need to create a SQL report with the structure like below:
    Country State City Vertical Business Details (detail desc)
    US MA Quincy Healthcare
    This is a detail desc value that needs to displayed in a different cell.
    This is a detail desc value that needs to displayed in a different cell.
    This is a detail desc value that needs to displayed in a different cell.
    This is a detail desc value that needs to displayed in a different cell.
    US MA Braintree IT
    This is a detail desc value that needs to displayed in a different cell.
    This is a detail desc value that needs to displayed in a different cell.
    This is a detail desc value that needs to displayed in a different cell.
    I came through a solution where you can hide/display the long column value in a different cell. But my requirement is that it should be displayed when the page opens and user don;t want to click on a button to see the value. This is mainly for their presentations and printing. so its very annoying for them to click on so many buttons to see the detail desc value for every record. I am new to Java script, Please help

    I'm not sure I understand your requirements--are you showing us 2 lines of data, 7 lines, or 9? Do you want the long detail description on the same row, or underneath it?
    I'm going to go on the assumption that you're showing us two rows, and that the long descriptions in this example happen to be 3-4 lines long, and that you want the long descriptions underneath the details. In which case, I suggest using "named column" templates. They're a lot easier to use than they appear when you first look at them, so bear with me.
    Under "Shared Components", select "Templates", and then click on the yellow Create> button. You're creating a report template, from scratch. On the final page of the wizard, select "Named Column (row template)" for the template type. This will create a rather generic (and useless) template, which you'll have to edit; I don't know why they chose to not send you straight into the editor. When you edit it, you'll see that the only field with a value in it is "Row Template 1", and it's set to:
    <tr><td>#1#</td><td>#2#</td><td>#3#</td><td>#4#</td><td>#5#</td></tr>For meeting your requirements with basic functionality, change it to something along the lines of:
    <tr><td>#COUNTRY#</td><td>#STATE#</td><td>#CITY#</td><td>#VERT#</td></tr>
    <tr><td colspan="4">#DETAILS#</td></tr>Then you'll probably want to put something under Column Heading Template, like:
    <tr><td>Country</td><td>State</td><td>City</td><td>Vertical Business</td></tr>
    <tr><td colspan="4">Details</td></tr>Apply whatever CSS styles you want to it, of course.
    Using the template is straightforward: if your report, chose the template, and make sure your SQL returns values using the column names you specified in your template. Otherwise, you'll see literal "#COUNTRY#" text in your report.
    You can get fancy with these, of course, such as applying different styles to alternating rows, but I'll leave this as good enough to get you started (I hope).
    -David

  • How to pass custom z table field values to smartform

    hi i need to pass fields values from the table i created to already developed smartform..can anyone give me an example for this scenario

    Hi,
    You need to create an internal table in print program. Then fill the internal table using select statement. Now you need to declare One internal table in 'TABLES' tab of Form Interface in smartfrom.
    e.g.:
    IT_BKPF     LIKE     ZBKPF
    Now call the smartform in print program & pass the internal table(declared & filled in print prog) to the smartform.
    Ashven

  • Enhancement Req (v4.0): Report Query- Output Format- Derive from Item

    Brief Introduction
    I have 1 major request I would like to make (and 2 lesser ones). The first, I would like to specify custom available output formats for 'Report Query' objects, as well as Reports Regions, Interactive Reports, etc. I believe that this could easily be an instance setting in the Report Server region of the internal workspace, or per workspace / application. Even if not supported on the system wide level, I would recommend that the "Derived from Item" output format "Return Value" be allowed to be returned unaltered to the Report Server. I know that the type is returned as "_xf", and for my purposes I would REALLY like to be able to get something other than the defaults.
    Use Case
    I am creating a custom JasperReports integration (for which I will be launching a public SaaS beta extremely soon). It uses the standard Apex reporting objects (Queries, Layouts, Print Buttons, etc). JasperReports templates are uploaded as Report Layouts and everything works fine. I am, however, wanting to implement as many output formats as are available to me in Jasper...that means Word 07, Excel 07, ODS, ODT, etc. For the items that take a print server override I can handle this in other ways (even though this appears broken [see below]), but for the standard report queries this isn't available. I would basically like the option to define the set of available output formats for the report server, and what the "_xf" returned for each one is.
    Minor Requests
    - Replace Uploaded Templates: If a template is used often and updated, then it has to be changed everywhere...minor irritation.
    - Customize Report Server URL for the Workspace or Application: For SaaS instances, workspace developers may license or have access to reporting solutions that are not (and should not be) available to all of the Oracle instance's workspaces, or may conflict with a service that is already provided by the instance administrators.
    Broken
    When I use the print server override, with the "Use Headers From" option, it appears that neither my content type, nor my content disposition headers are being sent back to the client. This is the work around solution for the non-standard types issue I am requesting enhancement on, so I would like to know what I can do to get this working immediately.
    Additional Info
    As it stands, if the site is available, feel free to sign up for the beta. The beta keys will be exported soon to the instance and made available. Instructions on setup will also follow:
    https://apex.vendelinc.com/apex/f?p=home

    Hi, please did you get any solution to this issue? I am having similar challenge right now.
    select     EMP.DEPTNO as DEPTNO,
         DEPT.DNAME as DNAME,
         EMP.EMPNO as EMPNO,
         EMP.ENAME as ENAME,
         EMP.JOB as JOB,
         EMP.MGR as MGR,
         EMP.HIREDATE as HIREDATE,
         EMP.SAL as SAL
    from     SCOTT.DEPT DEPT,
         SCOTT.EMP EMP
    where EMP.DEPTNO=DEPT.DEPTNO
    and      DEPT.DNAME =upper(:dname)
    This run perfectly in sql developer, toad, and even inside publisher if I login directly to publisher to create report.
    Generating this same query in shared component query builder and testing it returns no data found. If I remove the last line, it works. but with the last line, it return no data found. It seems no one has been able to provide solution to this issue

  • How to update the Customer field value of PO Item under the Delivery Address Tab?

    Hi Friends,
         i tried to update the Customer field Using Bapi_PO_change.I passed the PO Order no,POADDRDELIVERY data with Item no,Adrees no,Customer no.But i am getting no data changed message from return table.I attached the screen shots.So please suggest me the helpful information for resoving this issue.
    Thanks,
    Dinesh

    Thank you friends,
                My Problem was resolved.In my case i have passed the customer value in BAPI_PO_CHANGE POITEM Table with updated customer value.
    Thanks,
    Dinesh

  • How to pass argument to App Process wo using hidden item

    Basically if i take this javascript that calls application process:
    function get_APP(pThis,pSelect){   
    var l_Return = null;
    var l_Select = $x(pSelect);
    var get = new htmldb_Get(null,$x('pFlowId').value,'APPLICATION_PROCESS=get_APP_List',0);
    get.add('P1_BA_TEMP',pThis.value);
    gReturn = get.get('XML');
    // skip
    I have ( according to many examples on the web ) to use the "hidden" item over wise it doesn't seem to work.
    It seems to be an excessive use of the items. It's just the variable. Right ?
    Thank you
    Andrew

    Andrew,
    "doesn't seem to work" is the worst way to describe something not working ;)
    1. the name of your on demand process is case sensitive
    2. have you tested the on demand code in SQL Workshop > SQL Commands? does it return the expected XML?
    3. put an
    alert(gReturn);
    in your javascript code after
    gReturn = get.get('XML');
    and see what kind of alert you get.
    Denes Kubicek
    http://deneskubicek.blogspot.com/
    http://www.opal-consulting.de/training
    http://apex.oracle.com/pls/otn/f?p=31517:1
    -------------------------------------------------------------------

  • How to set date value in hidden item

    I have a form which has an date item, P1_MTIME , if I use data picker and an procedure (After header)to define its default , as
    begin
    :P1_MTIME := to_char(sysdate,'DD-MON-RR HH24:MI');
    end;
    Everything works fine, but when I change P1_MTIME to hidden, I can only get its value set to date, not hour and minutes, such as 2006-06-23 00:00, what I did wrong?

    Why not just have a hidden item with the ID so that when you create (insert) it is null and you insert sysdate and when you are editing an existing value and hence have the ID you update. This logic is easy to place in a page process (when the page is submitted)

  • Before Header pl/sql process to assign values to page items

    How can i assign values to items on a page based on the data structure returned from a pl/sql procedure within the before header process? I am thinking of executing a pl/sql procedure based on a URL parameter value and then assign values to page items. Is this really possible using Apex 4.0.2? If yes, how can it be done?
    thanks
    Seetharaman

    The question isn't really clear. What kind of "data structure returned from a pl/sql procedure"? Please be much more specific.
    For a PL/SQL data structure such as record containing 2 elements (<tt>x</tt> and <tt>y</tt>) returned as an out parameter from a procedure to be assigned to 2 page items <tt>p1_x</tt> and <tt>p1_y</tt>, all that's required in the Before Header process is something like
    declare
      l_rec rec_type;
    begin
      the_proc(..., p_out => l_rec, ...);
      :p1_x := l_rec.x;
      :p1_y := l_rec.y;
    end;

Maybe you are looking for

  • Support for rfc1514 on Solaris 9

    All, Does anyone have experience configuring the snmp management agent on a Solaris 9 system? I need to use the rfc1514 standard (host-resource mib) to support a large server environment for monitoring a variety of health stats that we are currently

  • Automate BPM Process

    Hi, We are part of a testing team and we would like to automate the BPM process from start to finsih. Would PAPI / PAPI-WS help us for automation? Some of the activities are of "Screenflow" type using "BPM Object" as "input". We are able to instantia

  • [solved] Writing systemd service file - forking no pidfile

    Hey all, I am trying to write .service files for TORQUE, but am having some difficulty and quite can't understand the docs.  Here's what I have so far for the server [Unit] Description=TORQUE server Wants=basic.target After=basic.target network.targe

  • After upgrading I can't paste album artwork.

    Ever since I have updated iTunes to 10.4.0.80, I can't paste in album artwork. After I try to paste in my artwork for an album, the artwork is all black. Here is a screenshot of what I see after I paste in my artwork: I never had this problem before

  • InfoQuiz 2007 - Win 50 K INR - Registrations ends in 72 hours!

    Hi, Welcome to ISiM InfoQuiz 2007 - Organized by International School of Information Management, University of Mysore Participate in InfoQuiz 2007 and win upto 50K INR Open for all Students and Professionals Winners get 40K INR Runners take home 10K