Apex_Item.radiogroup in a Tabular Form (Update Only, no Insert)

Hi,
I'd like to use a radiogroup on a tabular Form. The Form will modify only existing records.
I've seen some more elaborate examples for Tab Forms that allow Insert.
But I am trying to use the APEX_Item.radiogroup function for an example like:
"Select Chairperson_Name, Approve_Status FROM Chairperson_Approval"
The Approve_Status column can be 'A' for Accept, or 'R' for Reject, and is the only updateable column in the Tabular Form.
So I should be able to create a Tabular Form (for Update Only) on the table Chairperson_Approval with the wizard.
Then I want to be able to go into the Source and change the SELECT statement to something like:
"Select Chairperson_Name, APEX_Item.radiogroup(1,approve_status,.....) FROM Chairperson_Approval"
and then let the automatic APEX processing (generated by the wizard) do the rest. Right? Can
anybody give me an exact example for APEX_Item.radiogroup. My documentation is not clear enough on this function.
Thank you very much, in advance.
Carol

Hi Andy,
Why do you get & set TEST attribute of the radiobutton?
What is a TEST attribute?
getAttribute("TEST") == 'Y')
setAttribute("TEST","Y");So I was thinking I should incorporate this toggle me function with my radiobutton and have the following inside the toggleMe function.
$x(''P24_SECONDARY_TASK'').value=' || ad.task_id || '"')
{code}
Am I right?
Cheers
-Joel                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

Similar Messages

  • Once more - tabular form / update only rows that have changed

    I know it's been asked before, but I haven't seen an answer I like. :-)
    I have a query that includes a single column the user can update, using APEX_ITEM.TEXT(10, updateable_field, 10, 10)
    I have an additional APEX_ITEM.HIDDEN(21) and APEX_ITEM.HIDDEN(22) that hold the two fields of the composite primary key. In order to track whether my updateable_field had changed, I created APEX_ITEM.HIDDEN(11, updateable_field), which I expected would hold the OLD value of the field. See where I'm going with this? :-)
    I'm attempting to loop through apex_application.g_f21, get the values for F10 (new) and F11 (old) and compare them. If they're different, I'll do the update.
    It works fine if the old value (F11) is empty and I plug in a new value (to F10).
    But if I change a field that had already has a value (in F11) and make it NULL, I notice that F11(i) doesn't exist. In that case, I set the value to NULL, and the compare fails because it thinks the row is unchanged.
    Can someone suggest or point me to an alternate method that works?
    Thanks as always,
    Stew

    Mike,
    Thanks for the suggestion, which is a good one. But I had that one covered.
    I have it working now, and I believe the fix was that I moved the APEX_ITEM.HIDDEN that contained the old value in the query. I'd had it concatenated with the column for the new value (which used APEX_ITEM.ITEM). I changed it to concatenate to a plain string value. And now the array has values in it, which I can properly compare.
    Thanks again. That was really driving me nuts!
    Stew

  • Tabular Form - Read only condition for certain users

    Is it possible to make a select list field in a tabular form read-only to certain users? Here's the situation:
    The tabular form lists the users who need to select "Approve" or "Reject" in that field (they are approving or rejecting an engineering change)
    I want all of them to see the approval/rejection of their team, but only have access to edit the select list associated with their record.
    Thanks in advance.
    Apex 4.0.0.00.46

    You could use either "authorisations" tab or "conditional display" for the relevant column attribute.
    Report Attributes->Column Attributes->authorisationsIt would be better to have some more detail about what you are trying to get (maybe a quick mock up of the form, for example) but, I can envision something along the lines of the following:
    For each approval/rejection field:
    1. Create an authorisation appropriate for access to to each approval/rejection field e.g. authorisation scheme "FOO"
    2. In the relevant fields column attributes, set the authorisation to "FOO"
    3. now create a read only "public" copy of the above field, using the "display as text (based on LOV does not save state)" - set the authorisation for this field as "{NOT FOO}"
    (if you don't want to use authorisations, you could build an equivalent using "conditional display" instead, which is basically the same thing, except column specific)
    The downside is of course that you're duplicating fields in your query, which creates a bit of redundancy. There may be better ways to achieve this (maybe you could make use of the APEX_ITEM api, for example) but this is fairly easy to set up IMO.

  • DB Adapters Update Only and Insert Only Options

    Hi,
    Need details about "Update Only" and "Insert Only' options in Oracle SOA Suite 11g DbAdapter.
    What is differece between normal insert / Update and Insert Only / Update Only Options.
    Thanks,
    Arun Jadhav

    Hi,
    Need details about "Update Only" and "Insert Only' options in Oracle SOA Suite 11g DbAdapter.
    What is differece between normal insert / Update and Insert Only / Update Only Options.
    Thanks,
    Arun Jadhav

  • APEX tabular form update recognition

    Dear all,
    I am quite new to APEX so please apologize if I am asking "stupid" questions. Unfortunately, the information I was able to find up to now was only partially helpful. Apparently I must be missing something obvious. The APEX version I use is 4.0.1.
    When submitting a page that contains a tabular form, I need to find out, which record has been created or updated in order to fill in additional information automatically, e.g. logging data (created, last updated, ...). I cannot do this in a trigger, because the trigger sees only APEX_PUBLIC_USER and does not know about the "real" user who has connected to the database. If there is a better or easier way to do this, please let me know.
    My problem is to find out, if a new record has been added by clicking the "add row" button and / or if an existing record has been modified, because creation and modification have to be handled differently. Existing and unmodified records in the table must not be touched. I can access the columns by using APEX_APPLICATION.G_Fxx() but how do I recognize modifications? In a thread in this forum I found information about using a MD5 checksum. So I have added a checksum field using APEX_ITEM.MD5_HIDDEN() and tried to check this information. Unfortunately, doing this, I already get a problem when I submit the page after having added an empty record by clicking on "add row" but without having supplied any information. APEX then complains about information that has been modified in the meantime instead of just ignoring the empty record. This is probably because APEX considers the record as changed because of the checksum column I have added (I have read that the SQL query to create the tabular form must not be altered).
    Could anybody please show me the right way to do such a check?
    Thank you very much for your help.
    Best regards,
    Ralf Gorholt

    Hi Ralph,
    Well, if you are wanting to check if anything has been updated before the update button is pressed, using JS, you can use the property of the field 'defaultValue' and compare it to the property 'value'
    i.e. for the text input type
    function isElementChanged( myElement ) {
      var iselementChanged = false;
      var returnVal = false;
      switch ( myElement.type ) {
      case "text" :
        if ( myElement.value != myElement.defaultValue )
          return true;
        break;
    default
         return false;
    }  You could cycle through all elements, by:
    allEls = form.elements;
    for (i=0; i < allEls.length; i++){
      if ( allEls.type != undefined && allEls[i].type.length > 0 && allEls[i].disabled == false ) {
    if (isElementChanged(allElls[i])) {
    //TODO: logic here
    }Ta,<br />Trent                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • Issue with APEX_ITEM.CHECKBOX in Manual Tabular Form report

    Hi,
    I have a simple manual tabular form report with query :
    SELECT
    APEX_ITEM.CHECKBOX(1,order_id) ,
    APEX_ITEM.TEXT(3,Ord_number) ,
    APEX_ITEM.TEXT(4,ord_flag)
    from
    tbl_order
    and a process to update the value of Ord_number & ord_flag columns for the selected (Checked) rows.
    FOR i in 1..apex_application.g_f01.count
    loop
    UPDATE
    tbl_order
    SET
    Ord_number = apex_application.g_f03(i),
    ord_flag = apex_application.g_f04(i)
    WHERE
    order_id = apex_application.g_f01(i);
    END LOOP;
    But the values getting updated wrongly , how can I ensure the exact values is retrieved in apex_application.g_f03(i) & apex_application.g_f04(i) ?
    Regards.
    Benz

    I think the row selector is there if you create an tabular form. However, you can create it yourself following this example:
    http://apex.oracle.com/pls/otn/f?p=31517:170
    Basically,
    apex_item.checkbox (30,
                               '#ROWNUM#',
                               'onclick="highlight_row(this,' || ROWNUM || ')"',
                               NULL,
                               'f30_' || LPAD (ROWNUM, 4, '0')
                              ) delete_checkboxDenes Kubicek
    http://deneskubicek.blogspot.com/
    http://www.opal-consulting.de/training
    http://apex.oracle.com/pls/otn/f?p=31517:1
    http://www.amazon.de/Oracle-APEX-XE-Praxis/dp/3826655494
    -------------------------------------------------------------------

  • Tabular form update

    Hi everyone,
    I am working on apex 4.1, oracle 11g database.
    I have a tabular form with a first column of checkboxes.
    I want to check all the rows taht interest me, and update them with a value from a select list.
    It is exactly as if i wanted to delete the checked rows, only that i want to update them all with a value.
    Can anyone help me with this?
    I can't seem to find a way to select the rows that are checked.
    Thank you,
    Alex.

    See this http://docs.oracle.com/cd/E23903_01/doc/doc.41/e21676/apex_app.htm#CHDICJDA

  • Tabular Form : Update column

    Table  - TIME_RECORD
    Manual Tabular Form query
    SELECT APEX_ITEM.TEXT(31,E_TIME,30,35,'f31_'|| '#ROWNUM#')ETIME
    FROM   TIME_RECORD
    E_TIME column value is 11/29/2012 2:42:43 PM
    When running the form the column displays  - 29-NOV-12, the time part is not displayed.
    Please suggest why only date is displayed ? why Time is not displayed.
    Sanjay

    user12957777 ,
    Implicit conversion of DATE to VARCHAR2 uses the NLS DATE FORMAT.
    Try
    SELECT APEX_ITEM.TEXT(31,TO_CHAR(E_TIME,'DD-MON-RR HH24:MI:SS'),30,35,'f31_'|| '#ROWNUM#')ETIME
    FROM   TIME_RECORDUse the format mask that you need.

  • TABULAR FORM UPDATE ERROR CURRENT VERSION OF DATA IN DB HAS CHANGED...!

    Hi all Experts on Apex 423 and Oracle xe 11g r2...
    I'm getting a systematic error when updating a Apex Tabular form : the Oracle internal engine complaining that the row ID's are out of syncr?  I'm use ROWID instead of ID  ( trigger has been created but I think should not used ...!)
    Any advise.
    remark:  The  SIMPLE DATA APPLICATION has the same issue when trying to update the QUANTITY field on ORDERS... STRANGE NOT?
    MFOConsulting  Switzerland
    [email protected]

    Hi All Apex Experts,
    Détails  with Détails records  in a TABULAR FORM .
    I tranformed this program Master-Détails with Détails records  in FORM ( not tabular)  and this  error message is no more displayed on the screen.!!
    CONCLUSION:   there is a   SERIUOS  BUG in Apex 423.00.08   and 424.00.008!!
    I hope that People in Oracle Corporation is  working on this bug. and the next release of  Apex 5.0 will correct it.
    PS:   The SIMPLE DATA BASE installed   with any version of Apex... display this MSg .( update ORDERS  quantity of items and you recieve thiS fanny message!
    MFOConsulting Switzerland

  • Tabular form Update Error,"Current version of data in database has changed

    I'm getting an error when updating a Apex Tabular form. It's complaining that the row id's are out-of-sync. The error reads,' Current version of data in database has changed since user initiated update process. current row version identifier = "56DW5A8A7EBA3B42073AE6E71480A784" application row version identifier = "99B52A15F10E34647E9E18B6B7AE8C30" .
    Has anyone received this error? Any solutions? Note that the primary is being populated by a trigger. I have another tabular form for a different application that updates without issue, this however, uses a sequence to update the primary key.
    Thanks,
    James

    Make sure that the form is defined such that it "knows" that the PK is being set by a trigger. Do not try to set it in the form if the trigger is doing it. Pretty much if a trigger attempt to modify any column that also was editable (including hidden columns) in the form, the two will conflict.
    The other issue could be that do you have any items on the rows that are disabled? Disabled items are not sent to session state so Apex won't be able to properly compute the checksum and it'll find a discrepancy.

  • Manual tabular form "Update Process"

    Hello,
    i made a tabular form manually,
    now i want to add an update process, but its not working?
    I created a Button "P_UPDATE" and i added a Process which listens to the P_UPDATE Button.
    i used the following PL/SQL script:
    for i in 1..htmldb_application.g_f01.count
    loop
    update MATCHUMSATZ
    set PARTNER_ID = replace(htmldb_application.g_f10(i),'%'||'null%',NULL),
    RECH_DATUM = replace(htmldb_application.g_f02(i),'%'||'null%',null),
    RECH_NR= htmldb_application.g_f06(i),
    PROV_GRUNDLAGE= htmldb_application.g_f08(i),
    KUNDE= htmldb_application.g_f14(i),
    VERTRIEBSART_ID = replace(htmldb_application.g_f17(i),'%'||'null%',NULL)
    where id = htmldb_application.g_f01(i);
    end loop;
    This is an example which i customized from: http://www.oracle.com/technology/products/database/application_express/howtos/tabular_form.html
    I suppose that 'htmldb_application.g_f01' is the ID of the table 'MATCHUMSATZ'.
    Why is there replace() and sometimes not ?
    Would be glad if anybody could help me!
    Phil

    Hi Phil,
    You can add in the in-built MRU update process that will do this for you. When you add a process, select Data Manipulation then Multi Row Update, then follow the prompts to link it to your table.
    In your code snippet, htmldb_application.g_f01 refers to the first column in your form (even if this is hidden). Normally this is the Primary Key for the table on which the form is based. htmldb_application.g_f02 refers to the second column and so on, although you can assign any number from 1 to 50 to each field when you create the sql statement.
    The replace() function is used because some of the fields will contain %null% which needs to be converted to null before updating the table.
    Regards
    Andy

  • Tabular Form Read Only Date Picker

    Hello,
    I have two or three Items with date pickers and do not want to implement
    this code because it will be too many buttons on my form. I need to clear one item
    at a time when the datepicker is readonly but, in a tabular form.
    function f_clear_items()
        {$x('P1_ITEMA').value = ''};
        {$x('P1_ITEMB').value = ''};
        }Then once I create a url button and pass this function I can clear the datepicker's. But, I
    was wondering is there a cleaner way to this.
    I have other items on the page that are named the same but, in different tables. I only want
    to clear each date picker item at a time. This code works fine for a regular form.
    -Element Post Element Text for the Item to Clear
    a href="javascript:setValue('P1_ITEMA','');">Clear Date</aThere is a thread named 'How to clear a read only page Item...?' that states how this code works but, does not
    work for a tabular form in a Master Detail page. There is a link on side the Date Picker to clear item specified but, in a tabular form Item, there is no Element tab, any ideas on how to clear a readonly date picker item using a tabular form
    and not using a button for each item, thanks in advance. I am using Application Express 3.2.0.00.27.

    Dan,
    I totally understand your point of view. So, this tabular form aspect was not tested once the Clear Date link was discovered to clear a Read Only date field. Yes, using a button to clear a date is great but, I do not want to clear every date or specified item with the click of one button for this application. It is very useful but, not for my needs at the moment.
    Basically, if a date is selected and it needs to be cleared out you can just delete the value. But, if the date is readonly you can not clear/delete the date value unless you have the Clearing functionality for a particular item using the datepicker. It may not be worth the trouble Dan like you state by adding this extra code to the calender. If an invalid date is entered an error will appear anyway.
    Thanks alot Dan for expanding my mind and showing me some JQuery and providing me with this link to do some further research if needed, thanks again.

  • Tabular Form update,delete

    Hi,
    I am using database 11G, on windows XP with apex 3.0. I have created a tabular form with update & delete buttons. The table is a detail table having foreign key columns. On creation of form I choose foreign key column as primary key. The problem is when i check one row for delete the rows having same id on foreign key column are also deleted. Second When I update the following error is reported & no column is updated,
    Error in mru internal routine: ORA-20001: Error in MRU: row= 1, ORA-20001: ORA-20001: Current version of data in database has changed since user initiated update process. current checksum = "197D508D2444826DA98FC1E3D259EA31", item checksum = "F98E67DE7FF4EC9710E5A1B052E38C78"., update "HT"."INTRA_ORAL_EXAM" set "OPD#" = :b1, "TOOTH#" = :b2, "RESTORATION" = :b3, "DENETAL_DECAY" = :b4, "XRAY" = :b5, "SYMTOM" = :b6
         Error      Unable to process update.
    need help
    Sajjad

    Hi,
    OK - that makes it a bit more complicated as you can not add a primary key to a table that contains data. This means that we will have to copy the data into a temporary table first.
    Assume that you have a table called C_TABLE that is defined as:
    CREATE TABLE C_TABLE
    FIELD1 NUMBER,
    FIELD2 NUMBER
    )These are the steps that you need to do (each of these bits of code run be run separately):
    Firstly, copy the data into a new table:
    CREATE TABLE C_TABLE_COPY
    AS
    SELECT FIELD1, FIELD2
    FROM C_TABLECheck that the table has been created:
    SELECT * FROM C_TABLE_COPYThen drop the existing table:
    DROP TABLE C_TABLECreate C_TABLE with a new Primary Key column:
    CREATE TABLE C_TABLE
    C_ID NUMBER,
    FIELD1 NUMBER,
    FIELD2 NUMBER,
    CONSTRAINT "C_TABLE_PK" PRIMARY KEY (C_ID)
    )Create a new SEQUENCE object to provide the primary key with values:
    CREATE SEQUENCE "C_ID_SEQ" MINVALUE 1 MAXVALUE 99999999999999999999999 INCREMENT BY 1 START WITH 1 NOCACHE NOORDER NOCYCLECreate a new TRIGGER object to populate the primary keys with new SEQUENCE numbers when new records are added to C_TABLE:
    CREATE OR REPLACE TRIGGER "C_TABLE_BI"
    BEFORE
    INSERT ON C_TABLE
    FOR EACH ROW
    DECLARE
      v_id NUMBER;
    BEGIN
      BEGIN
        IF :NEW.C_ID IS NULL THEN
          SELECT C_ID_SEQ.nextval INTO v_id FROM dual;
          :NEW.C_ID := v_id;
        END IF;
      END;
    END;Enable the trigger:
    ALTER TRIGGER "C_TABLE_BI" ENABLECopy the data back into the table:
    INSERT INTO C_TABLE (FIELD1, FIELD2)
    SELECT FIELD1, FIELD2
    FROM C_TABLE_COPYCheck the new table has primary keys:
    SELECT * FROM C_TABLEAndy

  • APEX - tabular form update

    Hey guys,
    as per client's request, we need to insert rows into db from tabular form even there is no change on the new row. db table is configured to have nullable fields.
    Currently, it won't allow me to do so. Is there any way to force the insert/update without checking if the information on the row is updated?
    Thanks a lot

    You can do it, using manular tabular form.
    When you use automated Tabular Forms, it checks inbuilt global variables, to see row is updated or any new row is created and all necessary fields are keyed in.
    If you don't update an existing row, that row will not be updated..
    If you create/add new empty row and don't key in values, that row will not be inserted as there is no data..
    If you want to do in that manner, make your MRU process on the page to never and write your own manual MRU

  • Tabular form update manual

    Dears ,
    i have manual tabular form
    select htmldb_item.checkbox(1,rownum) " ",
           x.service_id,
           x.service_name,
    htmldb_item.checkbox( 4, flag,decode( flag, 1, 1, 0) ) flag
    from (
    select htmldb_item.hidden(2,c.service_id) service_id,
              htmldb_item.text(3,s.service_name)  service_name,
               htmldb_item.checkbox( 4, flag,decode( flag, 1, 1, 0) ) flag
    from  CUST_SERVICES c,SERVICES s
    where c.service_id=s.service_id
    and  c.cust_id=:p6_customer_id) x
    order by 2and make process to save
    Type:     PL/SQL anonymous block
    Process Point : on submit - after computation and validation
    Run Process : once per page visit (defult)
    source code :
    for i in 1..htmldb_application.g_f01.count
    loop
    update CUST_SERVICES set flag = htmldb_application.g_f04(htmldb_application.g_f01(i));
    -- where CUST_ID=:p6_customer_id
    -- and  SERVICE_ID =htmldb_application.g_f02(htmldb_application.g_f01(i));
    end loop;put it's not save , please help

    Hi Phil,
    You can add in the in-built MRU update process that will do this for you. When you add a process, select Data Manipulation then Multi Row Update, then follow the prompts to link it to your table.
    In your code snippet, htmldb_application.g_f01 refers to the first column in your form (even if this is hidden). Normally this is the Primary Key for the table on which the form is based. htmldb_application.g_f02 refers to the second column and so on, although you can assign any number from 1 to 50 to each field when you create the sql statement.
    The replace() function is used because some of the fields will contain %null% which needs to be converted to null before updating the table.
    Regards
    Andy

Maybe you are looking for

  • On screen Keyboard stuck under menu bar

    On one of my GB songs when I select window> Keyboard, to get the onscreen keyboard to show, half of it is running off the top of my screen under the menu bar. I cannot click and drag it down so I can use it. It allows me to stretch it to the right bu

  • I can't save documents in Pages.

    I can't save documents in Pages. I get a "file does not exist" error message. I've tried changing the file name, length, and location. To no avail. This is only sporadic.

  • Exception while creating Data Control

    Good day house, I have been doing some research on using business components design in other IDEs with Oracle ADF faces within JDeveloper 11g. I went through the following steps create a Java EE web application - a model and viewcontroller project im

  • Deciphering web themes: the html templates; expanded reference.

    the html templates. RKID attributes: Aperture uses proprietary ids within the html documents to identify the parts it needs to play with. These ids are 'rkid' ids. for example,    <ul id="nav" rkid="navbar"> These are the rkid values that I've identi

  • Problem connecting from Enterprise Manager

    I installed Oracle 10g on a standalone machine with Win XP pro. I'm able to login to EM. However, when I tried to perform admin tasks, it asks for OS username/password which I supplied. But it gave me this error message: Connection to OASISONE as use