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.

Similar Messages

  • Tabular Form: Conditional column based on another column in table/form?

    Hi!
    I have 4 columns in table A:
    number (the question number)
    question (the question to be asked)
    type (TEXT, LOV are the 2 valid values)
    answer (the answer with text or a selection from the lov table below)
    I have 2 columns in table B:
    number (the question number)
    values (a single value for the lov's)
    In table B there can be mutiple rows for each number. Table A and table B
    join on the number.
    I want to build a tablular form on table A where for each row either a text
    box or a select list is displayed depending on the contents of the type column.
    So row 1 would display a text box when the type value is text; row 2 would
    display a select list when the type value is lov.
    Is this even possible? How do I refer to the type column in the conditional for the
    answer column? I am guessing that I will need to have 2 answer columns one
    that displays when the type column is TEXT and one that displays when the
    type column contains LOV. This is OK. Setting up the conditional is display is the issue at this point.
    Hopefully I have explained this well enough! :)
    Thanks!
    Dave Venus

    Hi Dave,
    Sorry for not responding sooner - I finish work at 3pm GMT.
    I'll take your first question first (3:28PM posting according to my display - not sure if you are on GMT time?):
    As far as I understand it, using the select_list_from_query() function generates the options that are required in the select list as HTML tags. Each instance of this function should create a SELECT tag and the results of the query should generate one or more OPTION tags within it.
    Second question (4:20PM posting):
    The HTMLDB_ITEM functions are listed in the documentation - here's a link to the online version:
    http://download-east.oracle.com/docs/cd/B19306_01/appdev.102/b14303/api.htm#sthref2524
    Most of the examples that I have seen have been on this forum - simply search for HTMLDB_ITEM or one of its functions.
    I tend to leave the generation of tabular forms to the wizard as much as possible. The only exceptions are when I need to have access to more than the Primary Key for a row but don't want to show the field on screen. There are examples on the forum about concatenating the HTMLDB_ITEM functions into a single value - this hides ID fields from the user but makes them available to PL/SQL code.
    Third question (5:29PM posting)
    I did try using DECODE in my questionnaire but not for the feature that you needed. Originally, I wanted to use this to display one of a number of different fields (ie, my date, number or string field as appropriate to the question) but this didn't help as I couldn't get back to the right field during the update. If you have decode working for the select lists, then that's great!
    The first column should be hidden or sitting behind a checkbox as this should be the Primary Key for the row and should not be editable by the user nor would it normally be displayed.
    As long as your select statement creates the correct output (albeit that you may need to work on the layout!), you should have an updatable form. However, you will need to have the MRU processes in place and the appropriate buttons that trigger these. When I did my questionnaire, I created the form using a wizard to get all of the processes and buttons and then changed the select statement. If you haven't got the processes and/or buttons, we can go through adding these onto your page.
    Last question (9:08PM posting)
    As explained above, column 1 should normally be hidden. The INPUT tag you detail above is what I would expect to see. The value="6" attribute indicates that 6 is the Primary Key for that row - every row will have the same tag but different values for the "value" attribute. So, if it is hidden and these are the tags you see doing a View Source on the page, then everything is correct.
    OK. So now we have the data on screen and (hopefully?) we have the correct processes and buttons on the page.
    The next step would be validation and update of the data.
    Validation of the data can be handled by a normal page process - I can let you have example code if you want to validate the data (this will also explain how to loop through the rows - there are also methods that you can use to do this in javascript if you want). Updates should be handled by the processes and buttons on the page - again, if you haven't got these we can go through adding them in (although, if you haven't yet formatted your page, you may find it quicker to copy your select statement and create the page again using the same select statement).
    ORA-20001 errors are user defined errors. Do you mean the "data has changed" errors? If so, you will probably need to include the MD5 checksum functionality (it's shown in the document linked above).
    Finally, we'll keep this thread going so that you have all of your workings and my responses in one place, if that's ok with you?
    Regards
    Andy

  • 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

  • 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                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

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

  • 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

  • Horizontal scroll bar in tabular form with columns freeze

    Hi All,
    I have a requirement where i have to create a tabular form in which the first three columns should be in freeze mode and it should have a horizontal scroll bar.
    with the help of Google i found an example [http://apex.oracle.com/pls/otn/f?p=267:46]
    I want the same thing as in the example but with first three columns in freeze mode
    But could not find out how to create this column freeze and horizontal scroll bar.
    Let me know if you have any idea on this
    Thanks in advance,
    Ananth

    Hi,
    It is easy to look at the page source and see what they have done
    if you search for var d1 = document.getElementById("d and d1 you see some javascript doing the magic.
    Thanks

  • Tabular form default column value bug when using named notation?

    Hi,
    I am using Application Express 4.0.2.00.07
    After exporting and importing an application, the default value of a tabular form column results in an "ORA-00907: missing right parenthesis" error.
    My original application uses named notation while calling my function (no problem here):
    Report Attributes > Column Attributes > Tabular Form Attributes > Default type = PL/SQL Expression or Function > Default = pkg_customers.some_funtion (*in_param =>* :P15_FK_CUSTOMER_ID).
    When I change this in my imported application to ... > Default = pkg_customers.some_funtion (:P15_FK_CUSTOMER_ID) everything works fine again.
    Is this a known bug or is there something I do not see?
    Regards,
    Frederik Van de Velde.

    yes it is
    p_column_default=> 'calpa_pkg_klanten.fun_sm_betreft_default (in_pk_klant_id => :P9_FK_KLANT_ID)',
    p_column_default_type=> 'FUNCTION',
    by default it is set exactly the same, but when running the page the tabular form does not render because of the usage of " =>".
    thx

  • 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

  • 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

  • Forms need to get next record value in  tabular forms, update # on delete

    the isusue
    In a tabular form (multirecord)...when i enter + to add the first record , it should add 1 in this item 'order' and if i hit + again then it should enter 2 and so on....
    where users would enter different records at once and save it .However if they were to delete a record in the middle ...
    say record
    1
    2
    3
    4
    5
    6
    and delete 2 and 3 then # 4 should be 2 and # 5 should be 3 and #6 would be 4 . if they are to add a new record then it should assign the next number which would be 5
    what i have done is created a non database item in that block and made it a summary field with max
    and in the when_new__record_instance trigger...i am doing somthing like
    If block.item is NULL
    THEN
    block.item = block.non_database_item +1
    end if
    got this from a post here by Francois...
    it is adding just 1 everytime i hit + to add a new record...when the item is null in the beginning. However if i save the first record then click + to add new record then it goes inseries like 2..3..4....
    Any help would be appreicated . Thanks

    HI,
    Check following thread you may useful
    Maximum create call for the VO

  • 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

Maybe you are looking for

  • Is there any way to sort songs in iTunes library between mp3 versions and m4a versions.  Any help/guidance would be appreciated.

    Is there any way to sort itunes library between m4a and mp3 versions of songs.  If there is, any instructions and guidance would be most appreciated.  Thanks in advance.

  • Creating Cross Company Code Vendors/Customers.

    Hi All, I'm trying to understand how to create cross company code Vendors and Customers.  I've already established the link with configuring OBYA.  What I'm not clear is on which company code I should be creating the vendor and customer.  We have two

  • Syncing from more than one computer

    Ok, Apple experts, looking for some help. I currently sync my Itouch with my Toshiba laptop, that's where I have all my music,videos etc... I recently bought an Aspire one that I loaded Itunes on, is there anyway to keep all my music on my I touch bu

  • Use G4 in a network

    I'm not sure where to post this. We have early model G4 466 Mhz that has factory CD & Zip drives original HD crashed several years ago and I exchanged it out for either 200 or 250 Gig HD, that shows up in profiler as 114 Gig & I think there is still

  • Starting a career jump...what should my expectations be?

    As the title states I'm starting to transition into an IT career and I'm just curious what should my expectations be in terms of starting positions....culture changes...(admittedly a very "30,000 ft" level question.)To help, let me give a little back