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

Similar Messages

  • How to get a value from one item into another

    How can i get value from one item into another item.
    Ex: I have a report, in there i have check boxes, and when i have checked some rows, and press submitt, a prosses computates it into a item on another page, and a branche redirects to page 3. Then i'm going to use the value in the item into a PL/SQL script in an report to show the submittet items.
    How can i do this?
    Computation script, pages and all that is fixed. But i dont know which PL/SQL statement to use to get th value from the item.

    Hi Fredr1k,
    Use the V() function from pl/sql.
    e.g. V('P3_MY_ITEM')
    will return the value of that page item.
    As long as the pl/sql is called from within the Apex environment.
    Regards
    Michael

  • 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 get check value in DB based on java

    hi,
    anybody know how to get check value in DB based on java?
    TQ

    This should be a custom java class containing that method.
    Try on java or jdbc forum - Java Database Connectivity (JDBC) , Java Programming

  • 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...

  • 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)

  • Column link - call java script & assign current report column value to item

    Hi,
    How to call java script and assing current report column value to item?
    I have a button column in the report to 'delete' the selected row.
    I want to first show dialog box with message 'Are you sure?'. If yes, process to delete
    will be executed, else no action.
    In order to fire JS, I used Column Link ->Target=URL.
    Problem: The alert is showing but I don't know how to pass selected row's primary
    key value to process (to delete selected row).
    I have a item which can be used to store selected primary key value but don't know how to assign the value
    when button pressed.
    Thanks in advance
    Dip

    Ok. The issue has been resolved by following way.
    PAGE PROCESS: delete_request
    begin
    delete xyz
    where id = :P8_id;
    commit;
    end;BUTTON URL:
    javascript: DelRec(null,'CREATE', 'f?p=&APP_ID.:8:&SESSION.:delete_request:NO::P8_id:#id#');Java Script:
    <script language="JavaScript1.1" type="text/javascript">
    function DelRec(msg, req, url){
    var confDel = msg;
    if(confDel ==null){
    confDel= confirm("Are you sure?");
    }else{
    confDel= confirm(msg);}
    if (confDel== true){
    redirect(url);           }
    </script>

  • Get a value of a item  in a diferent time period - Script Logic

    Hi,
    So i'm facing the following problem,
    I've inputed some data on the time 2010.INP, wich is my member for data that will be used to calculate other members from diferente time period.
    For example, in my current view i have selected time = 2010.JAN, and i try to run the following code
    *WHEN ACCOUNT
    *IS "VOLUME"
    *REC(EXPRESSION=GET(account="YEARTAX",DATASRC="INPUT", TIME="2010.INP"),ContaVendas="MONTHTAX")
    *ENDWHEN
    So what i'm trying to do is, when the user inputs the value for volume, it gets the value that was previously set to the yeartax in the member 2010.INP, and copy it to MONTHTAX in 2010.JAN
    But the value that is returned is 0.
    Any ideas?
    Hopefuly i made mysel clear!

    Hi,
    yeartax and monthtax are members of which dimension? I can see account and contavendas in 2 different locations.
    Assuming that the above 2 members are from the contavendas dimension, please modify the script to
    *WHEN ACCOUNT
    *IS "VOLUME"
       *REC(EXPRESSION=GET(CONTAVENDAS="YEARTAX",DATASRC="INPUT", TIME="2010.INP"), CONTAVENDAS="MONTHTAX", TIME=%TIME_SET%)
    *ENDWHEN
    Hope this helps.

  • How to get the value of a variable in group footer in the report footer also

    I have a placed a formula as below at the group footer and the report footer. The data is grouped on the basis of duedays which is again formula and the value in that is appearing correctly.
    Whilereadingrecords;
    Global Numbervar CNTONE;
    Numbervar P := P+1;
    IF P = 1 AND {@DUEDAYS} = 0
    THEN CNTONE := {spSUPPLIERSOA;1.INVOICEBAL}
    ELSE IF P>1 AND  {@DUEDAYS} = 0
    THEN CNTONE := CNTONE + {spSUPPLIERSOA;1.INVOICEBAL}
    At the group footer I get the value correctly for CNTONE but when I place the formula in Report footer I get the value for CNTONE as 0.
    Please do let me know how I could get the same value in the report footer also.
    Regards
    Sreejith J

    Hi Abhilash;
    When I give the statement whileprintingrecords then my above formula sums up only the first record and the last record of the group and when I give whilereadingrecords it adds up all the data in the group correctly.
    The formula that you mentioned for the report footer had worked out and it is showing my result correctly.
    I did not put up the reset formula on the group footer because as the group changes I had used another variable in another formula for example for the second group I used
    Whilereadingrecords;
    Global Numbervar CNTTWO;
    Numbervar Q := Q+1;
    IF Q = 1 AND {@DUEDAYS} = 30
    THEN CNTTWO := {spSUPPLIERSOA;1.INVOICEBAL}
    ELSE IF Q>1 AND  {@DUEDAYS} = 30
    THEN CNTTWO := CNTTWO + {spSUPPLIERSOA;1.INVOICEBAL}
    I have set up total 5 such formulas as the number of groups that will be formed is 5. I have put up these formulas on the group footer and suppressed it as I dont want to get it displayed.
    The as you suggested the solution for Report Footer I did that and getting the result correctly.
    I dont know I may be following a longer procedure
    Take Care
    Sreejith J

  • Standard Report Headings,  JAVA script usage,and  Report field fixed width

    My company has purchased Crystal Reports 2008 and I'm in the process of determining if the product will do everything we need and not become a maintenance nitemare. 
    We would like to setup some standard report headings to be used in all reports.  I've setup on already as a SUBREPORT and it works fine. We pass optional parameters that may be blank.
    We have several questions:
    1) Subreport...Once a SUBREPORT is setup as a standard heading and included in multiple reports, we are concerned about what is required if the standard heading subreport changes.  Will each report that uses this need to be opened or handled in any way to pickup the subreport changes?  Any suggestions how to handle this?
    2) Subreport....In order to get the "PAGE N of M" to work in the subreport we've setup the subreport to accept parameters that are passed from the main report and this works fine.  But this requires every report using the standard heading to setup the parameters in order to work.  Is there any other way that would minimize the setup needed for a standard heading?
    3) JAVA...  Can we call a Javascript function? If so, any hints/tips on how/where to do this?
    4) Standard Report... Creating the report is difficult with guessing the width to define to the field.  Is there a way that the report can know and display the exact size of the field being used?  A fixed field defininiton of some sort would make it MUCH easier in the layout of the report.
    5) Standard Report...We are currently testing with a stored procedure for the SQL query result data but because of the application we will need to build the query dynamically for every report.  Is there a way to bind the data and specify the field lengths? 
    6) Standard Report...When using a defined file structure I needed to add another field.  At the time it seemed like I had to start from scratch as the fields that were on the report were now gone.  Is there a update method that can be done import the changes and not loose existing fields on a report? 
    That all for now.  Sorry there are so many questions.  We are trying to clear up as many issues as we can before starting the 100+ reports needed.
    Thanks in advance.

    Hi Vitaly Izmaylov,
    I've taken your advice and split out questions 2-6 into seperate questions.  Anyone else please respond only to question 1 here. 
    I see the Re-Import subreport option....and I guess I can only assume that this means that any change to a report heading file (subreport) must be manually re-imported into every report it is used in.  There are no behind the scenes files or table that maintain a usage of these reports and can automate the population of the changes.
    I was hoping that maybe the subreports would be accessed when called for an pickup any new changes.  So if I create 100 reports with standard heading subreport, I would need to manually open and re-import that file in each report to update a report heading change.
    Does not sound real fun.
    Is all this true?
    Thanks,
    Tim

  • JDev 9.0.3.5 : How to get the value of an item on a page in the controller

    Hi,
    In the processFormRequest part of my page controller, when the user clicks on Apply, I need to pass the value(s) entered by the user, to a PL/SQL stored procedure. The user enters a value for a field called "FirstName" on the page. I then need to pass this value to a stored proc. But the following code gives me a java.lang.ClassCastException on the 2nd line here. What am I doing wrong?
    String firstNameStr = "";
    OATextInputBean firstNameBean1 = (OATextInputBean)webBean.findIndexedChildRecursive("FirstName"); // This line throws exception!!
    OAWebBean firstNameBean = (OAWebBean)pageContext.getWebBeanValue(firstNameBean1,firstNameStr);
    Any help is greatly appreciated.
    Kind regards
    Tessa Lillie

    rather use
    String firstNameStr = pageContext.getParameter("FirstName");

  • How to get the values from xml file to java combo box

    Hi frens,
    I am new to java and xml programming,
    Now, i want to have a code of getting the tag values from the xml file
    into the swing combo box of java front end.
    How can we do that?
    any help of code or tutorial or an ebook is a great help for me.
    Thank you,
    Karthik.
    Edited by: Karthik84 on Aug 27, 2008 1:49 AM
    Edited by: Karthik84 on Aug 27, 2008 11:29 PM

    look at this link
    http://www.stylusstudio.com/docs/v2006/d_help30.html
    I read sometime back that castor has a tool to do
    conversion. You might have a look into casto as well.

  • Getting specific values From a database in Java

    Hey,
    I'm using XE and building an application in Java to do basic CRUD operations on the database.
    One of these operations is searching for a customer by last name (which runs fine) and the result of the query (a customer ID, a first name, and a last name) is displayed in a JTable. I want to be able to click on the record I need and use the customer ID to do an insert on another table CUSTOMER_PURCHASES which maps purchases to customers.
    How do I go about doing this knowing that customer ID is an auto-incremented number (using a SEQUENCE)?
    I thought about creating a variable in Java of type String called customerID and initialize it like this: String customerID = "CUSTOMER_SEQUENCE.nextval"
    But by doing this, I suspect that I'll be getting the next available customerID, not the one from the record I selected.
    Can anybody suggest a workaround or lead me in the right direction?
    Thank you in advance for the help and sorry about the long post, but I'm a newvbie to this field.

    As per raychen's advice, I was able to get the image from the database and bring it over into JavaFX.
    In my java class I retrieved the image as follows:
            BufferedImage image = null;  //Buffered image coming from database
            InputStream fis = null; //Inputstream
            try{
                ResultSet databaseResults;  //Returned results from DB
                stmt = conn.createStatement(); //Create the SQL statement
                databaseResults= stmt.executeQuery("SELECT * FROM mydb.`user` WHERE userID = 'username';"); //Execute query
                fis = blah.getBinaryStream(3);  //It happens that the 3rd column in my database is where the image is stored (a BLOB)
                image = javax.imageio.ImageIO.read(fis);  //create the BufferedImaged
            } catch (Exception e){
                     //print error if caught
           return image  //My function returns a BufferedImage objectSo in JavaFX, depending on how you have it set up, you essentially get the returned BufferedImage and create the image as follows:
    var bufferedImage : BufferedImage = theJavaFunctionThatReturnsABufferedImage();
    var newImage : Image = javafx.ext.swing.SwingUtils.toFXImage(bufferedImage);  //BufferedImageCheers and Happy New Year.

  • Getting action event of table component inside java script function of anot

    Hello,
    <af:document id="d1" partialTriggers="pt1" theme="dark">
    <f:facet name="metaContainer">
    <af:resource type="javascript"> function handleTableDoubleClick(evt) {
    var table = evt.getSource(); AdfCustomEvent.queue(table, "TableDoubleClickEvent",{},true); evt.cancel();
    function handleRowSelectionClick(evt) {
    var component = evt.getSource();
    AdfCustomEvent.queue(component, "rowSelectionClickEvent",{},true);
    evt.cancel();
    function handleLinkSelection(linkClickEvent){
    var table=AdfPage.PAGE.findComponent("tbl");
    alert("Components:"+table);
    AdfActionEvent.queue(table,true);
    </af:resource>
    </f:facet>
    <af:form id="f1" usesUpload="true">
    <af:pageTemplate id="pt1" viewId="/ESOPM_Base_Template.jspx">
    <f:facet name="main_content">
    <af:panelStretchLayout id="pgl" bottomHeight="0px" inlineStyle="width:auto;">
    <f:facet name="center">
    <af:table varStatus="rowStat" width="auto" value="#{MainContentBean.collectionModel}"
    rows="#{MainContentBean.collectionModel.rowCount}" rowSelection="single" contentDelivery="immediate"
    var="row" rendered="true" id="tbl" >
    <af:clientListener method="handleTableDoubleClick" type="dblClick"/>
    <af:serverListener type="TableDoubleClickEvent" method="#{MainContentBean.HandleDoubleClickTable}"/>
    <af:clientListener method="handleRowSelectionClick" type="click"/>
    <af:serverListener type="rowSelectionClickEvent" method="#{MainContentBean.HandleRowSelection}"/>
    <af:forEach items="#{MainContentBean.columnNames}" var="name">
    <af:column sortable="true" headerText="#{name}" headerClass="TableHeader" sortProperty="#{name}"
    inlineStyle="width:100px;" id="c1">
    <af:panelGroupLayout id="pnl_grCol" halign="center" valign="middle">
    <af:image source="/images/folder.gif" rendered="#{name eq 'Collection Name'}" visible="#{row['Document Type'] eq ''}"
    id="i2"/>
    <af:image source="/images/Computer_File.gif" rendered="#{name eq 'Collection Name'}"
    visible="#{row['Document Type'] eq 'Document' or 'Application'}" id="i3"/>
    <af:outputText value="#{row[name]}" id="aot1" clientComponent="true" >
    <af:clientListener method="handleRowSelectionClick" type="click"/>
    <af:serverListener type="SelectionClickEvent" method="#{MainContentBean.HandleRowSelection}"/>
    </af:outputText>
    </af:panelGroupLayout>
    </af:column>
    </af:forEach>
    </af:table>
    this is my code , In this when i am clicking on rowSelectionEvent its going to bean class i want the same action to be performed on the click of outputText so what can i do for that ,I want to execute same action as performed on table component for single click , on outputText
    Regards
    Mayur Mitkari

    Hi,
    I think there are two solutions to the problem
    1. <af:outputText ... clientComponent="true"
    2. If this doesn't work, replace af:outputText with <af:inputText ... readOnly="true"/>
    Frank

  • HFR - Getting the value from a member prompt to render in a report

    I have need to see the value or values selected from an HFR report prompt on the report once the report renders.
    The prompt value is desired to be placed in the Header of the report but ultimately as long we can see the prompt value rendered/placed any where on the report that will be good.
    Is there a function or other means to capture the selected dimension value stemming from a prompt selection?
    The more complex piece to this questions is that the row member where the prompt resides is using an advanced member selection which takes the value of the member prompt AND the Lev0 list of members to display on the report. Doing the level 0 "AND" of the advanced member selection removes any chance of getting the original prompt value select.
    If any one has any ideas or tried and true techniques, please share.
    Thanks in advance.
    Cheers,
    Christian
    http://www.artofbi.com

    Hi Christian
    It sounds like you are familiar with the text functions that can get you member names / aliases from cells.
    Have you thought about retrieving the member from the prompt and then simply hiding the column/row,
    e.g. in column A select 'Prompt for Dim'
    in column B select 'Descendants of Same Member as Col A' AND 'Level 0 Dim'
    hide column A
    use the text function to get you the name/alias from column A
    Hope this helps
    Stuart

Maybe you are looking for