Return two columns values through Javascript

In the same goal as:
onclick="$s('P1_DEPTNO', #DEPTNO#); return false;"
to return a column value through javascript, is it possible to return 2 values? Example:
onclick="$s('P1_DEPTNO', #DEPTNO#); $s('P1_EMP, #EMPLOYEE#);return false;"
Thanks all :)
Max

Maxime Carrier wrote:
In the same goal as:"Goal"?
onclick="$s('P1_DEPTNO', #DEPTNO#); return false;"
to return a column value through javascript, is it possible to return 2 values? Example:
onclick="$s('P1_DEPTNO', #DEPTNO#); $s('P1_EMP, #EMPLOYEE#);return false;"Have you tried it?
This code contains a syntax error in the form of a missing quote. It should be:
onclick="$s('P1_DEPTNO', #DEPTNO#); $s('P1_EMP', #EMPLOYEE#);return false;"It might also produce JS syntax errors if the <tt>#DEPTNO#</tt> and/or <tt>#EMPLOYEE#</tt> values are not numbers.
onclick="$s('P1_DEPTNO', '#DEPTNO#'); $s('P1_EMP', '#EMPLOYEE#'); return false;"would therefore be safer (assuming the code is somewhere that <tt>#DEPTNO#</tt> and <tt>#EMPLOYEE#</tt> will be substituted).
Your post is spectacularly lacking in context. Why do you want to do this? Where?
When you have a problem you'll get a faster, more effective response by including as much relevant information as possible upfront. This should include:
<li>Full APEX version
<li>Full DB/version/edition/host OS
<li>Web server architecture (EPG, OHS or APEX listener/host OS)
<li>Browser(s) and version(s) used
<li>Theme
<li>Template(s)
<li>Region/item type(s) (making particular distinction as to whether a "report" is a standard report, an interactive report, or in fact an "updateable report" (i.e. a tabular form)
Following the guidelines in these documents will also help to explain the problem in much more detail and with sufficient background for it to be understood:
<li>+How to ask questions+
<li>+{message:id=9360002}+

Similar Messages

  • Merge two column value in single column

    Team,
    I have a requirement where in I need to merge 2 column values in a single column.
    ex. I have Percent_complete column in my table. and my table has only one record.
    I need to query such that I need to store the values of percent_complete and (100- percent_complete) values in a single column.
    ex
    Percent complete has 30 value.
    I need to select 30 and 70(100-30) both in a single column.
    Thanks,

    SQL> select  *
      2    from  tbl
      3  /
    PERCENT_COMPLETE
                  30
    SQL> select  abs(grouping(1) * 100 - max(percent_complete)) percent_complete
      2    from  tbl
      3    group by rollup(1)
      4  /
    PERCENT_COMPLETE
                  30
                  70
    SQL> select  nvl(percent_complete,100 - max(percent_complete)) percent_complete
      2    from  tbl
      3    group by rollup(percent_complete)
      4  /
    PERCENT_COMPLETE
                  30
                  70
    SQL>
    SY.

  • Verify if a report has a null column value with JavaScript ?

    Hi,
    I have report. User can add new rows through a form. Before the user leaves the application I would like to use JavaScript to check if a certain column has some null values. I built my JavaScript for the before logout and it's working properly, but I need to retrieve if that column has some null values, how can I do that ? This field isn't a mandatory one, but I would just like to alert the user.
    Thank you.

    You can also use a TRIM function in Answers. Go to the column in question, click on the fx button and then on the Function button. Click on String and you will see TrimLeading, TrimTrailing and TrimBoth. Use TrimTrailing on your column and you should be good to go.

  • How to get values through JavaScript

    Hi,
    I have a report region, in this report one column is Select List having values 1,2,3,4,5 & other columns are text fields.
    I want if user selects 1 from select list then next column of report should get disabled.
    Any help would be really appritiated.
    Thanks,

    onchange="javascript:setvalues(this,'here your text filed name')";Note: text field name like f01..
    put the above code in report column attributes -->
    select list column--> Tabular form Element --> element attributes
    Then
    <script type="text/javascript">
    function setvalues(filter,textboxname)
    var s = filter.id; ----> this is for your report id taken
    var item = s.substring(3,8); --> common id
    var field3 = textboxname + item; ---> now it will give your text box name its look like f05_0001
    alert(filed3);
    var a = filter.value; ----> it will give your select list value.
    alert(a);
    }take the alert message values.
    put the code in page attributes --> HTML Header.
    check this first ...
    send your text box id. it will look like ex: f05_0001
    Cheers,
    Shan

  • Comparing two column values with multiple Parameter in VC (Indicator)

    Hello VC experts,
    GM
    I would like to know about how to indicate multiple parameter with different colour in same column and also comparing value with adjucent column.
    Eg.
    Parameters     ,,           Column1      ,,              Column 2       ,,            Indicator (Image)
    Parameter 1    ,,             a1             ,,                     b1          ,,                  RED
    Parameter 2    ,,            a2              ,,                     b2          ,,                  GREEN
    Parameter 3    ,,            a3              ,,                     b3          ,,                 
    Parameter 4    ,,            a4              ,,                     b4          ,,
    In case I  : Parameter -1     Column 1 ( value)  =  more is better compared to Column 2
    In case II : Parameter -2     Column 1 ( value)  =  Less is better compared to Column 2
    How to acheive this  INDICATOR based value comparison.
    Edited by: Sunil  B. Mundhe on Mar 7, 2009 6:30 AM
    Edited by: Sunil  B. Mundhe on Mar 7, 2009 6:38 AM

    Hi
    This is possible in VC. You have to insert 'Image' UI in the required table. Add images of alert through 'Image manager' (Tools tab). Select relevant images of alert in 'Image' UI. In display there is option for 'visibility condition' there you enter condition (like if greater than ,true,false).
    Like wise you can add multiple 'Image' UIs in that table & based on visibility conditions you will get these alert images in table.
    Regards
    Sandeep

  • Trying to set application item value through javascript

    Hi,
    I am not sure what I am doing wrong here can someone possibly shed some light? I have the following in my
    HTML Header of my login page
    <script language="JavaScript1.1" type="text/javascript">
    function setAppItem(val){
      var req = new htmldb_Get(null, &APP_ID., 'APPLICATION_PROCESS=dummy', 
      &APP_PAGE_ID.);
      req.add('F_LOGIN_MESSAGE', val);
      var gReturn = req.get();
      req = null;
    </script>
    <script language="JavaScript1.1" type="text/javascript">
    function doLogin()
      var err = false;
      alert(document.getElementById('P101_USERNAME').value);
      if((document.getElementById('P101_USERNAME').value == '') ||
        (document.getElementById('P101_PASSWORD').value == '')) {
        setAppItem('You must enter a username and password.');
        err = true;
      if(!err) {
        doSubmit('Login');
    </script>The setAppItem function does get called but it is not setting the application items text?
    Thanks in advance for any help!

    Thanks for all of your help Jari it is appreciated!
    For others the solution was to add the following to my HTML Source
    <div id="LOGIN_MESSAGE"></div>and then created the javascript routine
    <script language="JavaScript1.1" type="text/javascript">
    function setAppItem(val)
      $x('LOGIN_MESSAGE').innerHTML=val;
    function doLogin()
      var err = false;
      if($v('P101_USERNAME') == '' || $v('P101_PASSWORD') == '')
        setAppItem('You must enter a username and password.');
        err = true;
      if(!err)
        doSubmit('Login');
    </script>
    Thanks

  • Spool ALV not displaying two column value

    Hi,
    In spool ALV is getting displayed. But the output is not printing the value of 2 columns , both are MATNR values. I checked the output table it is fetching the material number but ALV is not displaying it. please help its urgent. The GI material is not getting displayed.

    HI Aparjitha,
    As per the above screenshot I assume there should be only 2 possible cases as said by Jyoti. Apart from that there is no other chance of missing data, especially for couple of columns in the output.
    If you are passing the value at run-time to MATNR and you are able to see that in output, hence your final internal table which you are passing to the ALV is not filled appropriately with MATNR values. May be those values are cleared somewhere.
    It would be better if you could share some piece of your subroutine FIELDCATFILL code. Also place a breakpoint before ALV display and check if the fieldcatalog and the final internal table are having the appropriate values.
    Regards,
    Naresh

  • Passing values through javascript

    hI gurus,
    I have a javascript function
    I open a new jspdynpage component in this window and pass a parametre along with it
    name = "xyz", name keeps changing ,Its
    function x(name)
    window.open("irj/servlet/portal/prtroot/Appname.Componentname?param = name")
    now when I do request.getparametre("param"), I get name , wherin I need xyz ...
    how can I achieve this

    Hi,
    that shoud be a problem with the parenthesis, try this:
    window.open("irj/servlet/portal/prtroot/Appname.Componentname?param="+name)
    Romano

  • I want a select statement to return two values, sum of one column and customer number

    I have two columns one called invoice_number and the other invoice_amount. I want a select statement to return two columns.... invoice_number and then the sum of the invoice_amount(s) for each unique invoice number.
    SELECT sum(invoice_amount) AS Totalinvoice_amount FROM InvoiceTB where invoice_number = 'INV102'
    This is where I've started, which returns:
    Totalinvoice_amount
    500.00
    Any help is appreciated.
    Please mark my post as helpful or the answer or better yet.... both! :) Thanks!

    Please post DDL, so that people do not have to guess what the keys, constraints, Declarative Referential Integrity, data types, etc. in your schema are. Learn how to follow ISO-11179 data element naming conventions and formatting rules. Temporal data should
    use ISO-8601 formats. Code should be in Standard SQL as much as possible and not local dialect. 
    This is minimal polite behavior on SQL forums. 
    --CELKO-- Books in Celko Series for Morgan-Kaufmann Publishing: Analytics and OLAP in SQL / Data and Databases: Concepts in Practice Data / Measurements and Standards in SQL SQL for Smarties / SQL Programming Style / SQL Puzzles and Answers / Thinking
    in Sets / Trees and Hierarchies in SQL

  • Column values convert to a single row...

    I have to return the column values to a single row seperated by comma.
    If any null values in the column just ignore it without leaving a comma.
    below is an eg. There are three values and two NULL values in the table
    SQL> select ID from temp_fa;
    ID
             1
             2
             3
             5
    6 rows selected.
    I am expecting an output as 1,2,3,5Please help

    There is always more than one way in the Oracle world ;)
    You can use TRIM, for example (same setup as your example):
    hoek&XE>  create table t as select level col  from dual connect by level <= 6;
    Tabel is aangemaakt.
    hoek&XE> update t set col = null where col in (1,3,5);
    3 rijen zijn bijgewerkt.
    hoek&XE> select * from t;
           COL
             2
             4
             6
    6 rijen zijn geselecteerd.
    hoek&XE> select ltrim(sys_connect_by_path(col, ','), ',') output
      2  from  ( select col
      3          ,      row_number() over (order by col) rn
      4          from   t
      5        )
      6  where connect_by_isleaf=1     
      7  start with rn=1
      8  connect by rn = prior rn+1;
    OUTPUT
    2,4,6,,,
    1 rij is geselecteerd.
    hoek&XE> select trim ( both ',' from sys_connect_by_path(col, ',')) output
      2  from  ( select col
      3          ,      row_number() over (order by col) rn
      4          from   t
      5        )
      6  where connect_by_isleaf=1     
      7  start with rn=1
      8  connect by rn = prior rn+1;
    OUTPUT
    2,4,6
    1 rij is geselecteerd.

  • Retrieving old column values from a after delete trigger dynamically

    I have a single audit table for deletions
    and the table structure has the following columns
    1: table_name
    2: column_name
    3: column_value
    I am writing a trigger on tables for which i want to have delete audits and i am dynamicaly
    retrieving the column names but i am unable to retrieve the column value dynamically;
    I tried to use the following statement but doesn't return the column value
    sql_stmt:= 'select :1 from dual';
    execute immediate sql_stmt into col_value using
    ':old.'| |v_col_name;
    where v_col_name is the name of the column which i retrieve dynamically using the
    dbms_sql.describe_columns procedure.
    Is their any way if i can retrieve the old column values in the trigger dynamically if i already
    have the column names in variables..
    Thanks in advance.
    null

    I don't know if Kevin's tip Help Mr. Sameer, but it did help me gain access to pre-deleted row column values.
    I did discover, however, that if the columns from the about-to-be-deleted row are used as inserts into another table, Oracle serves up a nasty-gram informing the user that values from the about-to-be-deleted table are unreliable.
    I was able to circumvent this constraint by assigning the about-to-be-deleted column values to local PL/SQL varables, then perform the insert using the variable values.
    -Bill McNamee
    NHDOT
    [email protected]

  • Stored procedure in  package return multiple columns from multiple tables

    Hi ,
    Can a single stored procedure return multiple column values from different tables.
    example:
    tabA: col2, tabB:col3,tabC:col4 etc.
    one more question:
    if a stored procedure like to return 10 columns for a particular record from a single table do i need to define a TYPE statement for each colum like
    TYPE col1 is TABLE of varchar
    TYPE col2 is TABLE of varchar
    here i want to return only one row, not many rows.
    thanks

    You can try one procedure with OUT or IN/OUT parameters that collect the values from one or more sql statements.
    CREATE OR REPLACE PROCEDURE P1
    (P_COD IN TABLE.COD%TYPE,
    P_DESC1 OUT TABLE1.DESC1%TYPE,
    P_DESC2 OUT TABLE2.DESC2%TYPE)
    IS
    BEGIN
    SELECT table1.DESC1, table2.DESC2
    INTO P_DESC1, P_DESC2
    FROM TABLE1, table2 WHERE
    table1.COD = P_COD and
    table1.cod = table2.cod ;
    END P1;
    JP

  • Compare previous column value in BPS Layout

    How to compare the two column values in BPS layout.
    My layout format
    PO NO
    GL
    Actual
    Amount
    1001
    701
    1200
    User Entry
    Actual Value is 1200, User will enter the Amount but it should be equal to 1200 or less then that.
    If user entered more than 1200 in Amount column, I should get error message.
    Thanks in advance.
    Regards,
    Kiruthika

    Hi Uryukin Andrey,
    Where do we need to use this fox formula? Could you please explain steps to use this FF?
    Thanks,
    Harry

  • How to swap column values using variable in sql?

    Hi,
    I have a table and i want to swap two column values using variable
    please help me

    Hi,
    Let us assume that the DeptNAME and DeptNo columns are of type VARCHAR2. However, DeptNO column is VARCHAR2(10) and DeptNAMe is VARCHAR2(100).
    First of all DeptNo column needs to be modified to be 100.
    i) ALTER TABLE DEPT MODIFY DEPTNO VARCHAR2(100);
    Secondly, you will swap DEPTNAME and DEPTNO values using the SQL as follows:
    ii) update dept t1
    set deptname = (select deptno from dept2 t2 where t1.deptno = t2.deptno),
    deptno = (select deptname from dept2 t2 where t1.deptno = t2.deptno);
    Now, finally you want the deptname columns to be VARCHAR2(10)
    iii) ALTER TABLE DEPT MODIFY DEPTNAME VARCHAR2(10).
    If DEPTNO is a NUMBER column, you cannot alter the datatype unless the table is empty; in that case the whole swapping requirement would be moot.
    Trinath Somanchi,
    ( http://www.myospages.com )

  • From two given tables, how do you fetch the values from two columns using values from one column(get values from col.A if col.A is not null and get values from col.B if col.A is null)?

    From two given tables, how do you fetch the values from two columns using values from one column(get values from col.A if col.A is not null and get values from col.B if col.A is null)?

    Hi,
    Use NVL or COALESCE:
    NVL (col_a, col_b)
    Returns col_a if col_a is not NULL; otherwise, it returns col_b.
    Col_a and col_b must have similar (if not identical) datatypes; for example, if col_a is a DATE, then col_b can be another DATE or it can be a TIMESTAMP, but it can't be a VARCHAR2.
    For more about NVL and COALESCE, see the SQL Language manual: http://docs.oracle.com/cd/E11882_01/server.112/e26088/functions119.htm#sthref1310
    I hope this answers your question.
    If not, post a little sample data (CREATE TABLE and INSERT statements, relevant columns only) for all tables involved, and also post the results you want from that data.
    Explain, using specific examples, how you get those results from that data.
    Always say which version of Oracle you're using (e.g., 11.2.0.2.0).
    See the forum FAQ: https://forums.oracle.com/message/9362002

Maybe you are looking for

  • More than one HP OfficeJet Pro 8100 printer

    Hi, I need to buy two wireless printers to use with an iPad. But the thing is: if I install TWO identical HP OfficeJet Pro 8100 under the same wifi network, how can I know which one I'll print? In other words, my concern is that when I'll want to pri

  • Created second partition in bootcamp Windows and converted whole disk from basic to dynamic

    Hi everyone. I don't post here often however I hope the following helps someone else down the road. I currently user ML and have bootcamp installed. I needed more space on my ML partition so decided to free up space from bootcamp. Going about this co

  • Moving itunes from old pc to new mac

    i just bought my first mac. i need to move my itunes library to my new imac. my first try at manually copying the library (disk use) to my ipod failed (i didn't think to check the size of my "itunes" folder). i pretty much have my 80 g ipod full. The

  • Document in Accounts Payable

    Hi Experts, I am new to FI and need some help. I am seeing that some of the incoive receipts(documtn type RE) which I can se BKPF & FB03 are not in accounts payable. What are the scenarios where an invoice document will not appear in accounts payable

  • Enable Selection field in datasource

    Hello All, I need to make a selection in InfoPackage for making Initialization of Datasource. When i checked in InfoPackage under data selection tab,i could nt able to see any selection Field i checked the datasource from which this IP is created and