Fill a column with Ajax in tabular form

Hello

I have the following problem.

A tabular presentation, created with the wizard and not with apex_item, has a certain LOV column with different values and attributes of the element the following call:

1 onChange = "javascript:f_getPV(#ROWNUM#,_this)";

The column that needs to be filled has ID = f10

2.
function f_getPV (pRownum, pInput) {}
get var = new htmldb_Get (null, & APP_ID., 'APPLICATION_PROCESS is getPV', 0);
get.addParam ('x 01', pInput.value);
gReturn = get.get ();
$("f10_000"+pRownum).text (gReturn); SPAN id
}


The application process (On Demand) looks like:

3.
declare
lv_pv_sk number: = apex_application.g_x01;
number of lv_cost_amt;
Start
Start
Select dc.cost_amt
in lv_cost_amt
Since DC default_cost
where 1 = 1
and dc.power_value_sk = lv_pv_sk
and dc.valid_till is null;

exception
When NO_DATA_FOUND then
lv_cost_amt: = 0;
When TOO_MANY_ROWS then
lv_cost_amt: = 0;
end;
HTP. PRN (lv_cost_amt);
end;

Unfortunately, I don't have any population for the f10 ID column.

Any ideas?

Hello

What HTML tag is than f10? If it is a box entry or text you cannot use jQuery text() function.
Something like this might work then

$s("f10_000"+pRownum, gReturn);

Kind regards
Jari

http://dbswh.webhop.NET/dbswh/f?p=blog:Home:0

Tags: Database

Similar Questions

  • Get the line item id and the value dinamilly with AJAX in tabular form

    Hello

    I have a table with a Popup Lov presentation, when I select something in the Popup of some elements (in the form of table) must be filled with the value returned from a query that uses the ID of Popup Lov (return value) as a parameter.

    How can I get this value and use only for this line?

    Thank you
    Alan

    Hello

    OK - that message sounds ok to me. You would like to check the javascript code after this line to see what he does - some alert() messages can help.

    To add a blank line to a tabular presentation, you can try:

    SELECT NULL Field1name,
    NULL Fieldsname
    FROM DUAL
    UNION ALL
    SELECT Field1name,
    Field2name
    FROM Tablename
    

    or, if you use 4 Apex, you can add a few::AddRow(); in the parameter "execute when Page Loads ' the page attributes

    Andy

    Published by: ATD February 8, 2011 17:57

  • How to fill a column with numbers and maintain when adding or deleting lines?

    So far, I've discovered two ways to fill a column with the number:

    1. Enter '1' in a single cell, '2' in the one below, select both, and then use the yellow dot to drag down - it will do the rest.

    2 create a formula such as 'A2 + 1' and drag also.

    However, in both cases it will work if I manually this continues to do for each newly added line at the bottom. Now, that alone would not be that big of a problem if it wasn't for the fact that I'm working with a table where the lines can be added among other rows in the future.

    Having said that, could someone please tell me how to create a column with a number that will increase automatically? I mean - if I add a new line between line 56 and 57, I want the new line to have a '57"in it, and the" old 57 "would now be"58"and so on." " I don't want to drag the whole column, which can be hundreds if not more than a thousand lines.

    Try to put this in the cells in the column:

    = ROW()

    In the formula, you can add or subtract a number if necessary to get the starting number that you need.

    SG

  • TRIGGER - how to auto fill a column with the sequence

    Hello

    I have a table that contains information about the customers... I have bound him to a form of the APEX so that when a user enter information through a form he generates a sequence/trigger number and saves it in the column (named tracking_NO)... I use this tracking_no as key for monitoring purposes.

    My problem is that when the admin will post information from MS access to Oracle, it generates automatically a number for my column 'tracking_No '... Please advice how to use the same trigger Auto Fill a column (tracking_no) when the value is zero.

    Here's my trigger

    CREATE OR REPLACE TRIGGER B.T_CUSTOMER_TRG
    BEFORE THE INSERT OR UPDATE
    ON B.T_CUSTOMERS
    REFERRING AGAIN AS NINE OLD AND OLD
    FOR EACH LINE
    Start
    If: NEW. "' TRACKING_NO ' is null then
    Select T_CUSTOMER_SEQ.nextval in: NEW. "' TRACKING_NO ' from dual;
    end if;
    end;
    /

    Two copies.
    I really think this is a bug coding causing this duplication.

    Published by: PhoenixBai on December 25, 2010 21:50

  • In DataGrid, how to fill a column with zeros (0) records?

    Is there a simple way, in a DataGrid, for fill the records in a column with zeros (0)?

    I have a DataGrid with two columns: colA and colB.  ColA records values from a RemoteObject call.  I need auto-fill (AutoFill) recordings in colB with zeros.  How is that possible?

    Thank you!

    If you need to 0 in the dataprovider, once pass you the loop of result of the data provider and add a dynamic property with value = 0;

    Something like that

    var dp:ArrayCollection = event.result as ArrayCollection collection;

    for (each var item: Object in PD)
    {
    item.demoValue = 0;
    }

    Create a new datagrid column, set demoValue as datafield.

    If it is just for display, add a new column, put an itemrenderer with label = '0 '.

  • Cursor to fill a column with an increase in the value

    Hello
    I had the example table EMP (empno, full name, etc). I've added the username column and I need to fill it with values: emp1, emp2, emp3,..., emp1000..., etc. (until it corresponds to all employees)
    Can you please provide an example of code to fill the column?
    Thank you in advance.
    update emp
    set username='emp'||rownum;
    

    Max
    http://oracleitalia.WordPress.com

  • Fill a column with serial number

    Hello, all seniors... !

    my table has a column empty NWT (number), I would now like to fill with a series of numbers
    for as many records that are also present.

    examples of table data.
      1  SELECT  TXN_DATE
      2  FROM PTXN
      3* WHERE ROWNUM <10
    
    TXN_DATE
    ----------
    18/03/2010
    02/02/2010
    10/02/2010
    05/04/2010
    15/05/2010
    25/01/2010
    03/02/2010
    15/01/2010
    25/04/2010
    
    9 rows selected.
    
    I issue this command;
    update ptxn
    set tno = rownum
    
    With the above Update SQL, the TNO column got filled with the exact number of records. Like this,
    SELECT  TXN_DATE,tno
    FROM PTXN;
    
    TXN_DATE         TNO
    ---------- ----------
    03/02/2010          1
    15/01/2010          2
    02/02/2010          4
    25/04/2010          8
    25/01/2010          3
    18/03/2010          6
    15/05/2010          9
    10/02/2010          5
    05/04/2010          7
    
    9 rows selected.
    what I want actually is to sort my table (ptxn) in the column "txn_date" wise and complete series.
    Like this;
    TXN_DATE NWT
    ---------- ----------
    15/01/2010 1
    25/01/2010 2
    02/02/2010 4
    02/03/2010 8
    02/10/2010 3
    2010-03-18 6
    2010-05-04 9
    2010-04-25 5
    2010-05-15 7


    How can I change my statement Update ot any other solution, please suggest.

    Using PL/SQL:

    SQL> select * from PTXN ;
    
    TXN_DATE         TNO
    --------- ----------
    07-MAR-10
    26-FEB-10
    01-MAR-10
    08-FEB-10
    03-MAR-10
    16-APR-10
    11-APR-10
    08-MAY-10
    14-MAR-10
    18-APR-10
    
    10 rows selected.
    
    SQL> begin
      2   for r in (select rowid i, TXN_DATE, row_number() over (order by TXN_DATE) n from PTXN) loop
      3     UPDATE PTXN p
      4        set TNO = r.n
      5      where rowid = r.i;
      6   end loop;
      7  end;
      8  /
    
    PL/SQL procedure successfully completed.
    
    SQL> select * from PTXN
      2  order by 1;
    
    TXN_DATE         TNO
    --------- ----------
    08-FEB-10          1
    26-FEB-10          2
    01-MAR-10          3
    03-MAR-10          4
    07-MAR-10          5
    14-MAR-10          6
    11-APR-10          7
    16-APR-10          8
    18-APR-10          9
    08-MAY-10         10
    
    10 rows selected.
    

    Max
    [My Italian blog Oracle | http://oracleitalia.wordpress.com/2010/01/31/le-direttive-di-compilazione-pragma/]

  • Not able to compare dates with apex in tabular form point and point

    Hello

    I need some help

    Workspace: REEMATEST

    email ID:- [email protected]

    password:-reematest

    Application No.:-52796

    page 5

    I have a table

    create the table trial_master

    (

    Identification number,

    date of act_st_date,

    date of ac_end_date

    )

    I send you the ac_end_date and the id of page 5 page 4

    in a modal popup window

    all employees associated id is displayed as a table

    whose values are fethcing of

    create table trial

    (

    Identification number,

    date of act_start_date,

    date of act_end_date,

    VARCHAR2 (1) flag.

    number of res_id);

    My problem: -.

    on page 4, please see the plsql process

    Impossible to compare dates

    Hi Reema,

    Control your process,

    you compare with the value of the element to Date with date of beginning not with the end date that is why it is updating an incorrect value.

    changing your date in the code below, columns

    in lieu of f03, f04 replaced by State, check the modified process

    DECLARE
    
    L_ACTL_START_DATE  TRIAL_MASTER.act_st_date%TYPE;
    L_ACTL_END_DATE    TRIAL_MASTER.ac_END_date%TYPE;
    
    begin
    
    FOR i in 1 .. APEX_APPLICATION.G_F01.COUNT LOOP
    
    IF  trim(upper(APEX_APPLICATION.G_F04(i))) != trim(upper(:P4_END_DATE))
    THEN
    UPDATE TRIAL SET
        act_start_date = TO_DATE(APEX_APPLICATION.G_F03(i)),
        act_end_date = TO_DATE(APEX_APPLICATION.G_F04(i)),
        FLAG='Y'
        WHERE RES_ID = APEX_APPLICATION.G_F01(i);
    
        ELSIF  trim(upper(APEX_APPLICATION.G_F04(i))) = trim(upper(:P4_END_DATE)) THEN
    
        UPDATE TRIAL SET
        act_start_date = TO_DATE(APEX_APPLICATION.G_F03(i)),
        act_end_date = TO_DATE(APEX_APPLICATION.G_F04(i)),
      FLAG='N'
        WHERE RES_ID = APEX_APPLICATION.G_F01(i);
    
    end if;
    END LOOP;
    
    end;
    

    Hope this helps you,

    Kind regards

    Jitendra

  • The sum of a column with 2 values using Forms 6i

    Hello world
    I have 2 blocks, a main block and the other is
    my block of retail and my block of retail element is a list item
    When I have 2 options to choose, we're for described video and the
    Another is for delay.
    My question is:
    How can I add an item in my form where I will summarize the
    amount of A and L is inserted on this column?

    I forgot about it. DECODE cannot be used in SQL. This time I tried the solution myself in Forms 6i, so I know it works. Set the formulas

    InStr(:Item,'A')

    This returns 1 if the value is A, 0 otherwise. Ditto for the L value of course.

  • highlight with development not tabular form

    more questions for beginners faq. (Where is it?  :-)
    Is it possible to get the apex to highlight the element with focus?
    (I'm talking a form of database not value).

    Looks like it would be a very popular and he has/is something that a developer forms can be configured to do this, I thought that maybe apex would...

    I'm working on the implementation of ye olde secular 'jump' where the data input focus ignores a few items in function
    the value just entered the current element. I can get the move focus, but it is very difficult to see where
    He went, so the question of how to clear or set and disconnected the current focus point. (And if you have the developer toolbar focus could go to an element in the toolbar :-(

    Regardless of skip it or not, in my view, that it would be a great
    function that must be frequently requested but I couldn't just falls on any information on how to do it.

    Of course, there are other ways to do this "jump" other than to move the focus as disabling following, which must be entered according to the value of the current item? If someone has already tested all methods and wants to give an opinion on the implementation
    This the best and most simple way, I'd love to hear it! (I don't think that dynamic actions are a choice for me because it)
    There is a limit on the number and I think I have it would easily exceed.)

    But anyway, I still want to know how to set the value of the current element in a form that is not a report.
    TIA!

    Published by: Lake on December 12, 2010 16:01

    To highlight the field current, you need to place this code in all areas (the html form element attributes).

    onblur="this.style.backgroundColor='white'" onFocus="this.style.backgroundColor='lightyellow';"
    

    Gus

  • How to submit a hidden in tabular form column?

    I have a tabular layout with dynamic action of line add fills a column with a sequence. I don't want to show this column to the users.

    I inspect the HTML when I add a new line and it looks like expected:

    <input id="f04_0004" class="tagid" type="hidden" value="870 " name="f04">

    In this case 870 value from the sequence, which is good.

    But when I send the form, I get:

    • ORA-20001: find the value is not a valid number, please check the number format. (Rank 4)

    The only way the form sent successfully, it is if I change the hidden column to a text field which is hideous, considering that this field should not even be displayed much less displayed as a text field.

    Is there a way to get around this? How can I submit a column hidden on the server?

    Thank you

    John

    John K. says:

    I have a tabular layout with dynamic action of line add fills a column with a sequence. I don't want to show this column to the users.

    I inspect the HTML when I add a new line and it looks like expected:

    
    

    In this case 870 value from the sequence, which is good.

    But when I send the form, I get:

    • ORA-20001: find the value is not a valid number, please check the number format. (Rank 4)

    The only way the form sent successfully, it is if I change the hidden column to a text field which is hideous, considering that this field should not even be displayed much less displayed as a text field.

    Is there a way to get around this? How can I submit a column hidden on the server?

    There is a kind of white space character that appears in the value of the column after 870. Is this "good"? What is it and why is that? We can provide no answer without knowing exactly how this value (and the rest of the line) are generated at the course to see the page and processed on presentation of the page.

  • Column with numbers filling

    Hello

    I want to fill a column with numbers from 1 to the end of the table. I need to create a function for him?


    THX in advance

    2890953 wrote:

    Hello

    I want to fill a column with numbers from 1 to the end of the table. I need to create a function for this?

    THX in advance

    What of it?

    SQL > create table mytable

    (

    number of N1

    number of n2

    )

    Table created.

    SQL > insert into mytable (n1)

    Select the level of + 1000 - number + 1000

    of the double

    connect by level<=>

    10 rows created.

    SQL > update mytable

    the value of n2 = rownum

    10 lines to date.

    SQL > select * from myTable

    N1 N2

    ---------- ----------

    1001 1

    1002 2

    1003 3

    1004 4

    5-1005

    1006 6

    1007 7

    8 1008

    1009 9

    10 1010

    10 selected lines.

    Kind regards.

    Alberto

  • Column manual non-null validation form

    Hi all

    I don't get the actual result with the code to validate the columns not null manual tabular form before submitting below. It retrieves the first row column only. I want to validate the columns in all rows.

    Can anyone please help and explain?

    begin
    for i in 1..apex_application.g_f03.count
    loop
    for j in 1..apex_application.g_f03.count
    loop
    if apex_application.g_f03(j) is null or i!=j
    then
    return 'Please Select a value';
    else
    return null;
    end if;
    end loop;
    end loop;
    end;
    

    Thank you

    Zourk

    Ourk

    Well go you twice the same table that seems weird.

    Then using return in the if statement you finish the operation of the service.

    If you want to collect all the lines for which the element is empty, see you the lines or the error message in a variable. And return the message only when all rows are processed.

    Something like

    declare
      v_message varchar2(2000);
    begin
      for j in 1..apex_application.g_f03.count
      loop
        if apex_application.g_f03(j) is null
        then
         v_message :=v_message||' Please select a value in row '||j ;
        end if;
      end loop;
      return v_message;
    end;
    

    Nicolette

  • Default values in tabular form

    I use Apex 4.0.

    I want to create a tabular presentation. Y at - it an easy way to fill some of the field values just after a new row is added. -Basically, I want to set some default values

    Ed.

    Hello Ed,

    Go to the attributes report > change a column ( column attributes ) > attributes of tabular form , you select the default Type and default .

    Then the line you add has this value.

    Kind regards
    Alan.

  • Default values &amp; javascript in tabular form manual

    Hello!
    I have a table that shows a new line in the upper part of the report... my sql statement is in the form of:
      SELECT 
      NULL EMPNO, 
      NULL ENAME, 
      NULL MGR, 
      NULL SAL, 
      NULL COMM, 
      0 SORTITEM, 
      'N' STATUS, 
      '' MD5_VALUE 
    FROM 
      DUAL
    UNION ALL
    SELECT...etc
    I used to have default values defined in the report attributes but those lost when I started using the approach above.
    How to reference the value of an element on the page, a default value for the line empty? For example, if the element: P60_EMPNO contains the employee ID for work, I want the EMPNO field in the empty line is pre populated with this value.

    Also, I used to have a javascript function which ran "onkeypress" for a field in the new row, but now I don't know how to implement with the new tabular form.

    Thank you!
    Tammy
    (currently using APEX 3.1.2)

    Hi Tammy!

    You can replace all NULL values in the SQL statement by your default values. The only condition would be that you should have at least one field that is NULL so that the code in the process knows that the user has not completed registration. In my example, I check:

    IF vSTATUS = 'N' AND vENAME IS NOT NULL THEN
    

    Yes, as long as the status is ' only and the user has not completed the ENAME field, the record will not be created - if, however, I put a default to ENAME, IF this test would be satisfied and, therefore, a new record would be created each time the page has been sent.

    What does javascript code? The APEX_ITEM. Text() function allows the inclusion of additional attributes for the INPUT tag that will be generated. See: http://download.oracle.com/docs/cd/E17556_01/doc/apirefs.40/e15519/apex_item.htm#CHDCDHJI

    In my example, I have:

    APEX_ITEM.TEXT(5, SAL, 7, 7, 'style="text-align:right;"') "Salary"
    

    Which adds the attribute "style" to the issue of the STARTING salary. You could do something like that to add in "onkeypress =" javascript:yourfunction (...); » "

    Andy

Maybe you are looking for

  • Safari does not.

    I'm under El Capitan 10.11.6.  The opportunity does not load Safari.  I click the icon, but it is not bouncing or anything, everything is there.  Only way to make it work is to shut down the computer and restart it manually.  That happen all the time

  • XP - main XBox Live account holder

    Original title: parent How can I chenge my daughter being on main account on the website of microsoft, for me his father so I can have the option to get xbox live online product.

  • do I need to buy a charger?

    I recently got a rocket as a gift. It came with a USB cable. It will automatically cool if connected to my PC (XP)? Or I have to go out and get a charger?

  • HP ProCurve 1800 - 24G of cascade switches

    Hello I have the following problem. I would like to connect/stack 3 switches not by RJ45 cables copper (which I do now), but by a cascading system or optical cables. In fact, I would have preferred cascading but I don't know if this is possible with

  • How to copy?

    Photosmart 5510. How to copy a sheet without scanning it?