Insert value in a column of the report in a page with JavaScript element?

I have a regular report. He holds a single column, and each line is clickable (as if it is a link). When you click on a line, a modal pop-up window appears (created by the use of JavaScript).

What I want is that when I click on a line, the value of the line I've selected is inserted in a page element. I want to use JavaScript so that I can do this dynamically, without refreshing the page.

So if this column name is #TEMPLATEID #, then I want a page element (say P24_TEMPID) to get the value of the templateid some selected line.
The function to open the modal is named OpenForm, I'd like to be able to write the code to insert the value in the page element that you want to be in this same function.

How can I write this in JavaScript?

Hello

You cannot use surrogate column #MEALTYPEID # in the header of the page JavaScript. How APEX know value of line witch who is?
Pass the two values of the column as a parameter
JavaScript in the HTML page header

function openForm(pTemplateId,pMealTypeId){
 $s('P24_TEMPLATEID', pTemplateId);
 $s('P24_MEALID', pMealTypeId);
 $('#ModalForm').dialog('open');
} 

Call JavaScript as

javascript:openform('#FOODTEMPLATEID#','#MEALTYPEID#');

Kind regards
Jari

-----
My Blog: http://dbswh.webhop.net/dbswh/f?p=BLOG:HOME:0
Twitter: http://www.twitter.com/jariolai

Tags: Database

Similar Questions

  • Insert the value of a column in the report in a page with JavaScript element - 2?

    Hi guys,.

    As explained here:
    http://jholoman.WordPress.com/2012/02/26/Apex-4-1-page-items-to-submit/

    We have two reports, sources of the region including:

    Select * from dept
    and
    Select * from emp where deptno =: p1_deptno

    IN report of the departments link attributes, we use this script to set the value of the point P1_deptno
    onclick = "$s ('P1_DEPTNO', #DEPTNO #); return false; "
    In the report used region, on the article Page to submit, we put: P1_DEPTNO

    Then, we use a dynamic action to refresh the report used (she should get updated when the value of P1_deptno). where it is supposed to show the employees of a specific Department:

    But I have failed to do... You can pls, take a look:

    http://theexecutivetowers.info:8282 / apex
    workspace: opener
    user: fat
    PWD: fat

    Kind regards
    I use apex 4.1 on win 2008 Server. listener 1.1.3 deployed on glassfish 3.1

    I do not have your pencil link to work. This column did not assess the value of the #DEPARTMENT_NAME column.
    Who estimated that:
    OnClick = "$s ('P1_DEPARTMENT_ID', #DEPARTMENT_ID #); return false; »

    as opposed to
    OnClick = "$s ('P1_DEPARTMENT_ID', 10); return false; »

    I got your columns Dept ID name and dept to become links by their implementation. You can see what I did there. I defined a function in the page header.

    You also had a typing mistake in your SQL for employees (p1_dempartment_id) so I've corrected it to p1_department_id.

    All together.

  • Static value in a column of the report

    Hi all

    I have a problem with the data displayed in a column in the report. I'll explain with an example.

    I have two tables A, B. And I associate myself with B on A extract the data of a column in the table b. data looks like in below after that I joined.


    Table A - table B

    Adam - Oracle

    Bill - Java

    Kevin - Oracle

    Kevin - Java


    so my report shows that Kevin has 2 records. where a single record and because of the property of the join, it displays in the form 2.

    Is there a way to show, Kevin as a record and the data in column (B) like "Java - Oracle?

    I use 9i db, apex 3.1


    Thank you in advance,
    Daniel

    Published by: Daniel on August 17, 2011 13:28

    Published by: Daniel on August 17, 2011 13:29

    Published by: Daniel on August 17, 2011 13:30

    With the help of 9i, you have to code your own pivot function... There are SEVERAL version of this out there:

    Uses the sample table emp that comes with Oracle...
    
    select
       deptno,
       rtrim (xmlagg (xmlelement (e, ename || ',')).extract ('//text()'), ',') enames
    from
       emp
    group by
       deptno;
    
        DEPTNO ENAMES
    ---------- ----------------------------------------
            10 CLARK,MILLER,KING
            20 SMITH,FORD,ADAMS,SCOTT,JONES
            30 ALLEN,JAMES,TURNER,BLAKE,MARTIN,WARD    
    
    Hint.. Try replacing the call to select from emp to wrap a select around your select from a & b..
    
    Or this one:
    
    select
       deptno,
       substr(SYS_CONNECT_BY_PATH(lname, ','),2) name_list
    from
       (
       select
         lname,
         deptno,
         count(*) OVER ( partition by deptno ) cnt,
         ROW_NUMBER () OVER ( partition by deptno order by lname) seq
       from
         emp
       where
         deptno is not null)
    where
       seq=cnt
    start with
       seq=1
    connect by prior
       seq+1=seq
    and prior
       deptno=deptno;
    
    DEPTNO NAME_LIST
    1      Komers,Mokrel,Stenko
    2      Hung,Tong
    3      Hamer
    4      Mansur 
    

    Thank you

    Tony Miller
    Webster, TX

    If vegetable oil is made from vegetables, then what is baby oil?

    If you answer this question, please mark the thread as closed and give points where won...

  • How to dynamically change the value of a column in a report

    Hi, I'm new to APEX and I have a small requirement. I have a report in a page which I query. Report will always have only one record. I need to change a value of a column in this report of the value received from another page. I was able to send the value of another page on my page of reports to a hidden page element, but I don't know how I can configure this value received to this column in the report. Is this possible? If Yes, can anyone help with this?

    970829 wrote:

    Please update your forum profile with a real handle instead of '970829 '.

    Hi, I'm new to APEX and I have a small requirement. I have a report in a page which I query. Report will always have only one record. I need to change a value of a column in this report of the value received from another page. I was able to send the value of another page on my page of reports to a hidden page element, but I don't know how I can configure this value received to this column in the report. Is this possible? If Yes, can anyone help with this?

    Not really clear exactly what it is you are trying to reach. You want to replace the value of a column in the report with the value of a page element? If so, simply replace the column in the report with a reference to the required page elementquery:

    select
       empno
    , ename
    , job
    , :p2_sal sal -- Replace value of sal column with value of P2_SAL item
    from
       emp
    
  • Using the value of the column of the report in view state

    Hi all

    I have a little trouble as long as you report column. Here's the problem I have face.

    I have a classic report in apex5 (universal theme). Please find the page here https://apex.oracle.com/pls/apex/f?p=62495:5:

    I want to have a condition that SAL column should appear only if DEPTNO! = 10. For this, I put a conditional display for SAL column that "point value / expression 1 column! Expression 2 ="and #DEPTNO # expression1 and expression2 10. But this doesn't seem to work. Can someone help me understand the issue.

    Note: I want to view only the column of the report, not the page item in the condition.

    Thank you

    Stephanie.

    Kalesh Ravi-Oracle wrote:

    I want to have a condition that SAL column should appear only if DEPTNO! = 10. For this, I put a conditional display for SAL column that "point value / expression 1 column! Expression 2 ="and #DEPTNO # expression1 and expression2 10. But this doesn't seem to work. Can someone help me understand the issue.

    It is not possible to report baseline values in the State of the reference column. It would be unwise to do so: how APEX can determine if the column should be included or not until all rows are retrieved?

    Note: I want to view only the column of the report, not the page item in the condition.

    Why? In the example given, this is the correct (and more effective) approach. If the condition must be based on the expected query results, then use a Exists (SQL query returns at least one row) or NOT Exists (SQL query returns no line) condition.

  • How to use the prompt value in the column of the report

    Hello

    I have a quick report column which is 'Adj Type' that contains values 10,20,30, and when the user selects Adj Type = 10, this value should be passed on to the column of the report.

    For example. Value in column 1 is 10 and this should multiple with the prompt value and production is expected to be 10 * 10.

    Ideas how to capture the prompt values in the column of the report for the calculation.

    Hi hsekar,

    (1) declare a presentation online in the section variable set Variable--> Variable--> P_var presentation

    (2) in Fx Table_name. Your_column * @{P_Var}

    @{P_var} {20} (20 is the default, it replaces when a user selects the value in the command prompt

    Thank you
    Saichand.v

  • Dynamically show/hide columns in the reports of the IR

    Env

    RDBMS: Oracle XE 11.2

    Request Express 4.2.4.00.08


    Hi all

    I am bulding an open source oracle apex app to track aircraft using ADS - B technology.

    I have somes types of units.  for example (kilometers, miles, knots, feet and metres).

    So, in the report of the IR, I want pick capable of showing a unit in time.

    For example

    Radio Group.

    Ground speed: (*) km/h () Mhp (Knt)

    Vertical speed: (*) ft/s (m/s)

    Can anyone help to build a code or point a direction to get above result?

    I tried already a thread, but did not work.

    Apex: Display/hide report column with Radio button. 2 cents to Oracle by Christoph

    Display / hide column IR dynamically


    I have a limited knowledge of Oracle APEX.


    Levi Pereira says:

    I am bulding an open source oracle apex app to track aircraft using ADS - B technology.

    I have somes types of units.  for example (kilometers, miles, knots, feet and metres).

    So, in the report of the IR, I want pick capable of showing a unit in time.

    For example

    Group of radio buttons.

    Ground speed: (*) km/h () Mhp (Knt)

    Vertical speed: (*) ft/s (m/s)

    There are different ways to do this. Probably the easiest would be:

    1. Create lists of values (LOVs) for units.
    2. Add the elements of the Group of radio -based unity LOVs report interactive region (IR), by specifying one of the units as a default value.
    3. Present the radio group via the Items property of the Page to send IR region.
    4. Create multi-column report for each metric combination / unit.
    5. Control the display of the report columns (applies to IR, but also classic report columns) conditionally using value of element in the Expression 1 = Expression 2 conditions Expression 1 is the group element of relevant radio and Expression 2 unit LOV value corresponding to that used in the column of the report.
    6. Add a dynamic action on the evolution of the components of the radio to refresh the IR region.

    A less obvious approach would also use LOVs, group radio elements and dynamic action of change/update as above, but only have one column for each measure in the report. The column value is calculated using an expression based on the value of the radio group, for example:

    .
    .
    .
    /* Assuming base speed unit is km/h */
      ground_speed
    * case :p1_ground_speed_unit
        when 'mph' then 0.621371
        when 'kn' then 0.539957
        else 1
      end ground_speed
    .
    .
    .
    

    The unit could be indicated in the column heading in the report referring to the element of the device by using a substitution of static text string:Ground Speed (&P1_GROUND_SPEED_UNIT.)

  • Prompt dashboard value does not pass in the report

    Hello

    I use OBIEE 10 g. The problem is in Oracle BI answers

    I have a guest orders and its report. In the prompt, in one of the column, I use sql result. The sql query is a query of sup of co related where I used the 2 tables. employee_data and employee_region. The reason to use the subquery is that there is no column data_center in employee_data table. He has records for all data_center e.g. USA, UK, IND, AUSTRALIA etc. so I used the query sub with condition that gives the result on a center of particular data (here's of the U.S.) and the output of the query of this sub is entered for the main request. And the guests works very well and gives the correct result

    The sql query used for the column in the prompt (in Oracle BI answers) as
    SELECT EMPLOYEE_DATA.ENAME FROM EMPLOYEE WHERE EMPLOYEE_DATA.ENAME IN (SELECT EMPLOYEE_REGION.ENAME FROM EMPLOYEE WHERE EMPLOYEE_REGION.DATA_CENTER = 'USA')
    In the report, there are now 2 coulmns. -EMPLOYEE_DATA. ENAME and EMPLOYEE_REGION. DATA_CENTER
    I used the main column EMPLOYEE_DATA. ENAME to filter as a "guest."

    The problem is that the value from the prompt is failed at the prompt of the report, what I found. Because, rather than show the result for 'USA' data_center, it also shows the other data_center (UK, IND, AUSTRALIA) data.

    How to filter the condition I should use for EMPLOYEE_DATA. ENAME column in the report so that the prompt value will change to the report correctly?

    Thank you

    Published by: Kuldip on 21 February 2013 06:17

    Hi Kuldip,

    If a direct column is not used in the prompt then it would not strain the direct relationship with column with guest. In your case try using a variable presentation. Define a variable presentation in the command prompt and use the presentation variable to filter the report.

    Let me know if it worked.

    Kind regards
    Jay

  • Select the distinct value of a column in the collection in bulk.

    Hi all

    Collecting the data of a query to a variable of type table. I need to select a separate of a perticular column value in the collection.

    Collection has followiing values inside.
    Col(c).articleid,
    Col(c).userkey,
    Col(c).origin,
    Col(c).addnlorigindata,
    Col(c).avdest,
    Col(c).dispfmt,
    Col(c).sourcecode,
    Col(c).success_ind,
    Col(c).error_code,
    Col(c).entry_createddate,
    Col(c).createdby,
    Col(c).filenumber,
    Col(c).linenumber,
    Col(c).acctnum,
    Col(c).assetkey,
    Col(c).autocompletedterm,
    Col(c).accessionnumber,
    Col(c).requestdatetime,
    Col(c).requestorip,
    Col(c).articleordinal,
    Col(c).userinitiatedind,
    Col(c).captchastatus
    I need to select distinct column values (for example: Col (c) .sourcecode) collection and the need to insert in the table if the value in this column does not exist in the table.

    Say, Col (c) .sourcecode has the value XYZ, ABC. If the "XYZ" value does not exist in the table, so I need to insert in the table and if "ABC" exists in the tables then don't insert it. (something like fusion) after seecting to the distinct values in a column in the collection.

    Thanks n regards
    Nana Akkivalli.

    The collection must be inserted before you can use this topic.

    In the Begin block, you have to collect a loose and insert inside: something like

    SELECT *
    BULK COLLECT INTO l_array
    FROM ALL_USER
    ...CONDITIONS...
    
  • How to hide a column in the report when there are only zeros.

    Hi Experts.,.

    Is it possible to hide a column in the report when there are only zeros.

    Thanks in advance
    Vincent

    Vincent Krishna wrote:
    Hi Experts.,.

    Is it possible to hide a column in the report when there are only zeros.

    Thanks in advance
    Vincent

    No out-of-the-box, but there are several workaround solutions if you want to continue an any of them:

    (1) use a view selector. A single report will be a pivot table with the column, the other will have the same report less column. Users can switch reports.

    (2) use a column selector. The two choices would be this column or an empty space. If white is chosen (because the user has no values), the column "will disappear" according to the report.

    (3) guided use NAV. This method involves the intervention of the user. Build a small report using the single column and put a filter "is not equal to" 0. Because there is only a single column, so all lines are 0, the report returns no rows.

    Use this report in the properties of guided navigation from one section of the dashboard. Assign to this "If the report returns lines" and put the report that contains the column in this section. Now add another article on your table edge and in the properties of guided navigation of this section, set on "If the report will return no rows" and it points to the small report as well. In this section, put a second version of your report without the column in it.

    When the column contains all zeros, the second section with column will not display in it; the first section is not displayed. When at least a line contains a value not zero, the first section is displayed with the column, and the second part will not be.

  • I have a column with two values, separated by a space, in each line. How to create 2 new columns with the first value in a column, and the second value in another column?

    I have a column with two values, separated by a space, in each line. How do I create 2 new columns with the first value in one column and the second value in another column?

    Add two new columns after than the original with space separated values column.

    Select cell B1 and type (or copy and paste it here) the formula:

    = IF (Len (a1) > 0, LEFT (A1, FIND ("", A1) −1), ' ')

    shortcut for this is:

    B1 = if (Len (a1) > 0, LEFT (A1, FIND ("", A1) −1), ' ')

    C1 = if (Len (a1) > 0, Member SUBSTITUTE (A1, B1 & "", ""), "")

    or

    the formula of the C1 could also be:

    = IF (Len (a1) > 0, RIGHT (A1, LEN (A1) −FIND ("", A1)), "")

    Select cells B1 and C1, copy

    Select cells B1 at the end of the C column, paste

  • How to find a value in any column of the table - essentially a search

    Hi guys,.

    Thanks in advance for your help.

    I'll try to find a value in any column of the table? How can I do?

    An example of value would be "FEDERAL."

    Using Oracle 11 g and SQL Developer.

    Thank you

    It's a question that is asked in the past several times (but not recently from what I remember).

    Michaels has provided in the past, solutions which are quite clever, just using SQL...

    10g of solution

    Michaels > var val varchar2 (5)

    Michaels > exec: val: = "Sub".
    PL/SQL procedure successfully completed.

    Michaels > select distinct substr (: val, 1, 11) "keyword."
    substr (table_name, 1, 14) "table."
    substr (t.column_value.getstringval (), 1, 50) ' / value of the column.
    CLO.
    Table
    (xmlsequence
    (dbms_xmlgen.getxmltype ("select" | column_name))
    || 'from ' | table-name
    || ' where upper (')
    || column_name
    || ') as superior (' %' |: val)
    || '%'')'
    ) .extract (' LINES/rowset / * "")
    )
    ) t
    -where table_name in ('EMPLOYEES', 'JOB_HISTORY', 'SERVICES')
    order of the "Table".

    11g upwards

    SQL > select table_name,.
    column_name,
    : search_string search_string.
    result
    from (select column_name,
    table_name,
    "ora: view("' ||) " table_name | "") / LINE /' | " column_name | "[ora:contains (text ()," %' |: search_string | ")]. (%») > 0]' str
    CLO
    where table_name in ('EMP', 'Department')),
    XMLTable (columns str result varchar2 (10) path '.')
    /

    TABLE_NAME COLUMN_NAME SEARCH_STRING RESULT
    ------------------------------ ------------------------------ -------------------------------- ----------
    DEPT                           DNAME                          es                               RESEARCH
    EMP                            ENAME                          es                               JAMES
    EMP                            JOB                            es                               SALESMAN
    EMP                            JOB                            es                               SALESMAN

    4 selected lines.

  • Changing the order of the columns in the report

    Hello

    I use the Application Express 4.1.1.00.23 and created a report. What I can't seem to change the order of the columns however is generated by the report.

    It is not based on the SQL query because for example the 'Name' field is 2nd in the select statement, but on the report, see the last name column is the last column.

    Is it possible to change the order?

    Simple, change your report page > under region click report hyper link to your report.

    You will see the list of columns where you can order the columns on the report on the far right by using small icons. don't forget to click on apply changes after the reorganization of the columns.

    Thank you

  • How to put a "ageing in column" in the report

    Hello

    One of my end users wants a 'Aging' column in the report.
    That is to say he needs a column which gives the number of days between his container_received_date and the Current_date.
    Can I implement this directly in the OBIEE answers?
    or I have to put a separate column of formulas in the administration?
    Please suggest.


    Suma

    Hello

    Use timestampdiff function in answers column formula like this

    TIMESTAMPDIFF (sql_tsi_day, container_received_date, Current_date)
    or else
    use the same formula in RPD mdb layer create a new logical column
    Right-click logical table
    Select the logical column
    in the logical column check using the source from the existing logical table
    Add this formula

    Concerning

    NGO

    Published by: NGO Meda on March 23, 2009 04:35

  • How to add scroll bar to the field in the column of the report

    Hello again,

    I need to add a scroll bar to the field in the column of the report in my application "form.

    There is a table with columns of text and sometimes a lot of information must be filled in these areas, and thus the overview of the report becomes unreadable, because all rows have different heights according to the amount of text has been filled.

    What I want is to make all lines with the same height, and if there is more text in a field that can allow a height - a scroll bar appears so for this specific domain.
    Is it possible to do?

    Thank you in advance.

    Hello

    OK - it is important that tell you what type of report that you use like this makes a difference to what is possible!

    For interactive reports, you cannot use a CSS stylesheet in the same way with respect to normal relations. The easiest way is probably to include a complete div in your SQL statement directly. Something like:

    select      ID as "ID",
          '
    ' || "MY_BIG_FIELD" || '
    ' as "DETAILS" from TABLEX

    This will put the data in this column in the individual DIV tags, and then apply the style from the example of the Dene.

    Andy

Maybe you are looking for

  • OR PCIe-7851R compatibility?

    Hello I'm going to get a PC the appropriate for the Board of the NI PCIe-7851R. But I do not know what bus card PCIe use this forum, x 1, or x 4 or x 16? I'm sure it can work with x 16 'remote connection', but what about x 1? In addition, another thi

  • How to count double sum in labview

    Hi all. Please help me to solve my problem... I have a double sum of the formula that I have attached to my message. The data were also tied. I did my version of the solution, but it did not work... Please help me. Thank you so much in advance. Waiti

  • Access denied when you delete a file from a batch file

    I run a batch file to compress and then delete the original file.The file is with everyone full access, and therefore the file.I run the batch Administrator file (literally, right click and choose Run as administrator).The delete operation has always

  • What should I do to fix an error code 25015? It has to do with Visual Basic. I need a program for that too?

    I tried to download all net curriculum and I get the same error code?

  • 8 GB clip does not not with MP3Tag

    I just got a Clip of GB 8, updated for the 2 GB model and love it.  However, when I plug it into the USB port on my Win XP computer, in Windows Explorer it appears as one device of 'Other', as opposed to "Hard disk" or "devices with removable storage