Prepopulate data in File Browse in APEX

Hi,
Here is what I am trying to do and yet unable to figure it out -
I have a record in a database table with one of the field being the BLOB type.  I need to update several data fields for this record but need to leave the BLOB data untouched. 
I have a APEX form for this.  On the form, the BLOB data field is displayed as a "File Browse" item (say, File ABC) and is a required field.  However, I am having problems retrieving the corresponding data from the database.  Upon submit, the form always fails with a message saying "File ABC must have some values".
How can I go about pre-populating the data for this "File Browse" item?  I just need the BLOB data staying untouched and yet being able to bypass the validation for an update of the entire record.
Any suggestion is highly appreciated.  Thanks in advance!
Ning

951789 wrote:
Please update your forum profile with a real handle instead of "951789".
I have a APEX form for this.  On the form, the BLOB data field is displayed as a "File Browse" item (say, File ABC) and is a required field.  However, I am having problems retrieving the corresponding data from the database.  Upon submit, the form always fails with a message saying "File ABC must have some values".
How can I go about pre-populating the data for this "File Browse" item?  I just need the BLOB data staying untouched and yet being able to bypass the validation for an update of the entire record.
You can't. For security reasons the value of the file browse item cannot be set on the server.
Make the validation on the file browse item and processing of the uploaded file conditional, for example making it mandatory on insert (when the row PK item is null).

Similar Messages

  • Please help on uploading a CSV file on APEX through file browse

    Hi All,
    I need to upload a csv file in the table through file browse button.For that i have created the below process and function.This method is working perfectly fine when the file size is small.But i need to upload the file of 16 MB size and when i try to upload that file it gives error wwv_flow.accept error.Any expert of APEX please help me out on this error.As i am very new to APEX and i need to get this done as early as possible.Please provide any solution ,i will be really grateful to the person.
    function_
    create or replace function hex_to_decimal
    --this function is based on one by Connor McDonald
    --http://www.jlcomp.demon.co.uk/faq/base_convert.html
    ( p_hex_str in varchar2 ) return number
    is
    v_dec number;
    v_hex varchar2(16) := '0123456789ABCDEF';
    begin
    v_dec := 0;
    for indx in 1 .. length(p_hex_str)
    loop
    v_dec := v_dec * 16 + instr(v_hex,upper(substr(p_hex_str,indx,1)))-1;
    end loop;
    return v_dec;
    end hex_to_decimal;
    Process_
         DECLARE
         v_blob_data BLOB;
         v_blob_len NUMBER;
         v_position NUMBER;
    v_clob_data CLOB := 'anything';
    dest_offset NUMBER := 1;
    src_offset NUMBER := 1;
    blob_csid NUMBER := dbms_lob.default_csid;
    lang_ctx INTEGER := dbms_lob.default_lang_ctx;
    warning INTEGER;
         v_raw_chunk RAW(10000);
         v_char CHAR(1);
         c_chunk_len number := 1;
         v_line VARCHAR2 (32767) := NULL;
         v_data_array wwv_flow_global.vc_arr2;
         v_rows number;
         v_sr_no number := 1;
         BEGIN
         delete from scg_recievables2;
         -- Read data from wwv_flow_files</span>
         select blob_content into v_blob_data
         from wwv_flow_files
         where last_updated = (select max(last_updated) from wwv_flow_files where UPDATED_BY = :APP_USER)
         and id = (select max(id) from wwv_flow_files where updated_by = :APP_USER);
         v_blob_len := dbms_lob.getlength(v_blob_data);
         v_position := 1;
    -- Read and convert binary to char</span>
         WHILE ( v_position <= v_blob_len ) LOOP
         dbms_lob.converttoclob(v_clob_data, v_blob_data, v_blob_len, dest_offset,src_offset,blob_csid,lang_ctx,warning);
    v_char := dbms_lob.getlength(v_clob_data);
         v_line := v_line || v_char;
         v_position := v_position + c_chunk_len;
         -- When a whole line is retrieved </span>
         IF v_char = CHR(10) THEN
         -- Convert comma to : to use wwv_flow_utilities </span>
         v_line := REPLACE (v_line, ';', ':');
         -- Convert each column separated by : into array of data </span>
         v_data_array := wwv_flow_utilities.string_to_table (v_line);
    if IsNumber(substr(v_data_array(9),1,1)) = 1 then
    v_data_array(9) := substr(v_data_array(9),1,11);
    else
    v_data_array(9) := '01-JAN-1900';
    end if;
    v_data_array(9) := NVL(v_data_array(9),'01-JAN-1900');
         -- Insert data into target table </span>
         EXECUTE IMMEDIATE 'insert into scg_recievables2 (Account_receivable_number, the_account_number, bill_history_tran, service_number, item_type, the_amount_billed, the_remaining_amount,source_of_payment)
         values (:1,:2,:3,:4,:5,:6,:7,:8,:9)'
         USING
         v_data_array(1),
         v_data_array(2),
         v_data_array(3),
         v_data_array(4),
         v_data_array(5),
         v_data_array(6),
         v_data_array(7),
         v_data_array(8);
         -- Clear out
         v_line := NULL;
         v_sr_no := v_sr_no + 1;
         END IF;
         END LOOP;
         END;

    As noted, this confuses the issue, since a possible answer was posted in the OTHER thread.. Check your server logs, you are probably timing out.. From prior threads with a similar issue:
    Have a look at the httpd.conf file (or get your system administrator to look at it) and see what the value of TimeOut is set to. You may need to increase it in order to export large tables via APEX.
    http://www.apacheref.com/ref/http_core/Timeout.html
    Thank you,
    Tony Miller
    Webster, TX
    A lady came up to me on the street, pointed at my suede jacket and said "Do you know a cow was murdered to make that jacket?"
    "I didn't know there were any witnesses", I replied " Now I'll have to kill you too"

  • File Browse Option don't show me all Column in Data / Table Mapping

    Dear Friends,
    i am using 4.1 on APEX.ORACLE.COM.
    i have to created page with DATA Upload option.Page are ctreated successfully But there is one problem when i COPY & PASTE DATA from Excel Sheet then Data Upload Success fully.
    But When I use File Browser Option to Upload Data Then In Data / Table Mapping Step that show me Only One Column Name Select list with Do Not Load default option . but i have 7 column name in Excel Sheet. that should be display me 7 Select List to select All column name which are mention in Excel Sheet
    Please tell me where i am wrong and how to display all Column name in Data / Table Mapping step to upload Excel Sheet Data.
    How to Resplve this issue.
    Thanks
    Manoj Kauhsik

    Dear Earl,
    Thanks to reply me.
    I am not using Utility to upl;oad Excel Sheet Data.
    i am go through Apex.oracle.com .i have create an application to upload data from Excel Sheet.
    There is an option DATA UPLOAD when we create new Page so i have choose this option and create Pages with follow all instraction .By using this option i want to an Feature in my Application to Upload Data .
    When i use Copy and Paste OPtion to upload data from Excel Sheet.then Data ar Uploaded but Problem Is When i use File Browser Option to upload data then that show me only one option for Column name rather than i have 7 Column in My excel file.
    i have one more problem ,i have .csv file when i open it and close then no problem but when i reopen it then that show me a pop up with Meassages
    "Excel has detected abc.csv file is a SYLK file.but can't load it".
    How resole it.Please suggest me.
    Thanks
    Vedant

  • Apex 4.0 - Can see view data in SQL*Plus but no data in Object Browser

    Hi There,
    I have just started using Apex 4.o and migrated some apps. I have an issue with a report, but see the same issue with Object browser, which is easier to describe.
    I have a view:
    create or replace view V_PLJ_USERDEF_CODES (
             CODE_SET_ID,
             CODE_SET_CODE,
             CODE_SET_DESC,
             CODE_ID,
             CODE_SYS_CODE,
             CODE_VALUE,
             CODE_DESC,
             DISPLAY_SEQ,
             DISPLAY_FLAG,
             LANGUAGE_CODE) as
      select CS.CODE_SET_ID,
             CS.CODE_SET_CODE,
             CS.CODE_SET_DESC,
             C.CODE_ID,
             C.CODE_SYS_CODE,
             C.CODE_VALUE,
             C.CODE_DESC,
             C.DISPLAY_SEQ,
             C.DISPLAY_FLAG,
             C.LANGUAGE_CODE
        from PLJ_CODES C,
             PLJ_CODE_SETS CS
       where C.CODE_SET_ID         = CS.CODE_SET_ID
         and CS.CODE_SET_TYPE_CODE = SYS_CONTEXT('PLJUMPSTART','C_USERDEF_CODE_SET');This returns data in SQL*Plus, but no data in Object Browser OR report region based on this view.
    Workspace parses in the same schema as tested in SQL*Plus.
    If, in report, I swap out view, and use underlying table - no problem.
    Any ideas -
    thanks
    P

    Hi all,
    Thanks for getting back so promptly.
    It just seems weird to me, as tables are just fine, but not views.
    In the underlying schema:
    SQL> sho user
    USER is "ICSREPORTING"
    SQL> select count(*) from plj_codes;
      COUNT(*)
           107
    SQL> select count(*) from v_plj_userdef_codes;
      COUNT(*)
            29And in the APEX schema
    SQL> sho user
    USER is "APEX_040000"
    SQL> select count(*) from icsreporting.plj_codes;
    select count(*) from icsreporting.plj_codes
    ERROR at line 1:
    ORA-00942: table or view does not exist
    SQL> select count(*) from icsreporting.v_plj_userdef_codes;
    select count(*) from icsreporting.v_plj_userdef_codes
    ERROR at line 1:
    ORA-00942: table or view does not exist
    SQL>However, in SQL browser, I can see the data in PLJ_CODES but in V_PLJ_USERDEF_CODES, just the message "This view has no data". Indeed, it is like this for all views.
    I even explicitly granted access to APEX_040000 but no good.
    In fact, I would like to know more about how Apex gets access to do DML against the underlying parsing schema(s).
    This is a little frustrating though. It worked just fine in lots of apps in version 2.1 to 3.2
    Am I missing something
    paul
    p.s I knew there would be a question about the context, but I had already checked that. :)
    Edited by: PJ on Nov 19, 2010 4:09 AM

  • Open Cursor Issue because of file browse Item - Is this a Bug in APEX 3.2

    Hi All,
    I am using file browse Item to upload file into the database at two places in my application, but it seems whenever I am submitting those two pages, with file path or without file path, its opening an cursor which remains open after that, because of this open cursor count in the application is getting exceeding every time.
    For testing this I have made an dummy page containing just file browse item and submit button, and still it is increasing the open cursor count.
    Is this a bug in Apex file browse item or there is some other way to handle this.
    Please kindly help me in the above issue as this is affecting the production application.
    Thanks & Regards
    Sanjay
    Edited by: user11204334 on Dec 5, 2010 9:57 PM
    Edited by: user11204334 on Dec 5, 2010 9:58 PM

    Hi,
    One observation, Apex is switching the Session ID after one got killed ? I was working on Apex page with browse Item to test open cursor count,
    after killing the SID (227) on which the open cursor count was getting increase, it APEX automatically switches to new SID(149) for that session.
    Now the problem is even if I have two SID's and one hits the maximum open cursor count, It is not switching to other SID instead the whole application becomes unavailable.
    STATNAME SID VALUE USER
    opened cursors current 20 14 APEX_PUBLIC_USER
    opened cursors current 149 74 APEX_PUBLIC_USER
    opened cursors current 194 71 APEX_PUBLIC_USER
    opened cursors current 211 5 APEX_PUBLIC_USER
    opened cursors current 227 325 APEX_PUBLIC_USER Killed
    opened cursors current 244 15 APEX_PUBLIC_USER
    opened cursors current 20 14 APEX_PUBLIC_USER
    opened cursors current 149 76 APEX_PUBLIC_USER
    opened cursors current 194 71 APEX_PUBLIC_USER
    opened cursors current 211 5 APEX_PUBLIC_USER
    opened cursors current 244 15 APEX_PUBLIC_USER
    Please kindly help in this.
    Thanks in Advance
    Thanks & Regards
    Sanjay
    Edited by: user11204334 on Dec 8, 2010 1:02 AM

  • Store table data in a tab separated file in oracle apex

    How to store table data in a tab separated file in oracle apex ?
    Suppose i have a table 'Table1' as shown below.
    id name
    1 x
    2 y
    I want to get the result 'select * from table1;' into a tab separated file in oracle apex.

    For client you could
    - invoke call to Oracle Reports, where an .rdf is ready to generate one for you
    - utilise download as csv option in interactive reports
    - call page that generates csv using htp package (CSV Download without Header, possible?
    - modify an interactive report to do a similar thing (http://www.talkapex.com/2009/04/custom-download-for-apex-interactive.html)

  • Resetting the File browse item in Javascript in Apex 4.0

    Hi,
    Can anyone please help to reset the File browse item in Apex with Javascript.
    For example I have an File Browse item P10_FILE_BROWSE, I have selected some file in it and on Click of button, I want to set NULL in that File Browse item "P10_FILE_BROWSE"
    I have tried below options but none of them is working for IE 7
    $x('P10_FILE_BROWSE').value = null;
    $x_Value('P10_FILE_BROWSE',null);
    $s('P10_FILE_BROWSE',null);
    document.getElementById('P10_FILE_BROWSE').value = null;
    document.getElementById('P10_FILE_BROWSE').value="";
    document.getElementById('P10_FILE_BROWSE').reset();
    Please help at earliest.
    -Pramila

    For security and privacy, file browse item values cannot be set using JavaScript.
    Think about it: my page displays a file browse item, the user selects a file, then when the submit button is clicked, my JS code changes the value of the file browser to <tt>/etc/passwd</tt>. Not good.
    (Please update your forum profile with a real handle instead of "user12879893".)

  • File Browse Item in APEX versions prior 4

    Hi there,
    we are currently struggling with a strange issue concerning the File Browse Item in earlier APEX versions: The item value is not submitted correctly when using APEX Listener. There is always a F<randomnumber>/ as prefix that is not visible anywhere in the page source code (so it's not generated by APEX itself) or browser (Firebug trace didn't see any prefix transmitted) and this value is even there when the file browse dialogue is submitted empty. The latter case causes severe problems, as validations fail to detect null values. Our current workaround is a regex on that prefix, but this obviously is no clean solution.
    We found out that F<randomnumber>/ is the prefix of the name that is created temporarily in WWV_FLOW_FILES. If submitted correctly, the name is prefix + actual filename.
    This problem does not occur when using OHS and it does not occur when running the APEX Listener on top of APEX 4.0.2.
    The problem occurs reproducible in the following environments:
    - APEX Listener 1.1.2 standalone or any JEE Container, JDK 1.6.0_26, Linux or Windows
    - APEX 3.1.2 or APEX 3.2.1
    The problem seems to be related to the one discussed in {thread:id=2205973}, but describes some different effect that is not reproducible on OHS.
    I appreciate every clue where this may come from and any hint on how to turn it off...
    Thanks,
    Udo

    Hello Claudio,
    After reading this story, I have same problem with version 1.1 of the apex listener and version 4.1 application express.I still think it affects only versions prior to 4.0. I'm not able to reproduce it on 4.1.
    How do I resolve this problem?I think you ran into a bug in GlassFish 3.1.2. This has been discussed and resolved here: {thread:id=2357381}
    I hope this helps you solve your problem.
    -Udo
    P.S.: Please always open a new thread if you are not sure you are in the same situation and especially when the original thread is long "dead" like this one. Of course you can reference other threads with possibly similar issues in your thread.
    Thanks!

  • Why is the file browser unable to sort by date added (Safari, Mail, etc)?

    When I use the file browser (e.g. when I browse for a file to attach to an email or browse for a file to upload through a form) and try to sort by date added, it doesn't work.
    I can see the column for "date added" and it displays the correct date. I can sort by other properties and it works. But when I sort by "date added" it lists files that were added a while ago under "today" and the files recently added are under "no date" (even though they all have a correct date). The list doesn't seem to change day-to-day (e.g. files under "today" remain the same).
    Does anyone know what could be wrong? Am I the only one with this issue?

    Performance tip: Keep the Desktop clutter-free (empty, if possible)
    Mac OS X's Desktop is the de facto location for downloaded files, and for many users, in-progress works that will either be organized later or deleted altogether. The desktop can also be gluttonous, however, becoming a catch-all for files that linger indefinitely.
    Unfortunately - aside from the effect of disarray it creates - keeping dozens or hundreds of files on the Desktop can significantly degrade performance. Not necessarily because the system is sluggish with regard to rendering the icons on the desktop and storing them in memory persistently (which may be true in some cases), but more likely because keeping an excessive number of items on the Desktop can cause the windowserver process to generate reams of logfiles, which obviously draws resources away from other system tasks. Each of your icons on your desktop is stored as a window in the window server, not as an alias. The more you have stored, the more strain it puts on the window server. Check your desktop for unnecessary icons and clear them out.
    Keeping as few items as possible on the Desktop can prove a surprisingly effective performance boon. Even creating a single folder on your Desktop and placing all current and future clutter inside, then logging out and back in can provide an immediately noticeable speed boost, particularly for the Finder.
    And it is why Apple invented 'Stacks' for Leopard.

  • File Browse Upload Feature for Apex

    Hi,
    I added the File Browse feature to my Apex page. However I would like to customize the file to be uploaded into a different database as a BLOB. Any examples? Thanks.

    Jacky,
    Looks like you asked the same question here: File Upload to Custom Table
    Please refrain from double-posting.
    Thanks,
    - Scott -

  • APEX 2.2 - File Browse item maximum file length?

    Hi all,
    There seems to be a maximum length for file name (not path - just the name) that can go into APEX through the File Browse item. I have a file name that is 206 characters long. Even if I put the file in the root directory, when I try to upload it to my APEX application, I get a 404.
    What is the maximum file name length?
    Not relatedly, IE6 balks when the file path length exceeds a certain amount. It doesn't attach the file to the file input HTML element. Does anyone happen to know what that length is?
    Thanks!

    Don - See Re: Upload File with filename greater 80 characters -> HTTP 404 File not fo for related info.
    Scott

  • Import data from another browser - Only few IE9 favorites get transfered to bookmarks. HTML solution - HTML file all favorites correct, but same result

    Win7 / IE9: First time use. Example: One favorites folder has 4 HTML entries - only 2 get transferred. Some have none transfered - folder empty. Others have random correct + some missing.

    Monday Nght
    I can see complete IE9 Favorites HTML list in HTML file on Desktop with Firefox -> New Tab -> Open File.-> Open
    In desktop HTML file, there are 37 IE9 folders with no more than nesting 3 deep in any one top folder. These are all correct wrt IE9 favorites.
    All top folders + deepest nests are copied to FF ok. Contents random. Copied contents work ok
    7 HTML web sites not allocated to IE9 top folders are also copied <- these 7 copy to FF and work ok
    Example: First folder in IE9 list has no nesting., IE9 has 4 entries - Firefox has only 2. when either method of copying is used.
    BTW - please advise how I can delete whole Bookmark list in Firefox in one keystroke to be able to retry with a clean Bookmark list
    I am going to uninstall Firefox and start again with a clean copy and use HTML method only to try to transfer IE( files. I will report result.
    BTW, I am in UK on UK time - hence delays in replying - need to sleep sometimes!!!!!
    Tuesday Evening
    Hi
    I uninstalled Firefox. Re installed and loaded IE9 favorites from HTML file.
    All seem copied correctly
    First time I started by using the "import data from another browser". Partial copied.
    Then I tried "Import from HTML file" without deleting whatever favorites had been copied. Still partial copied.
    All seems well.

  • APEX File Browser ITEM - select only XML Files

    HI ALL,
    I have problem with File Browser Item.
    How to I use file browser item select only xmlfile (*.xml)?
    Edited by: Mahir M. Quluzade on Nov 29, 2010 2:33 PM

    Try using the attribute<tt>accept</tt> attribute using the item's HTML Form Element Attributes:
    accept="text/xml"but note the warnings about poor browser support.

  • Dynamic action on File browse change event

    Hi Experts,
    apex version 4.1
    This is what i'm trying to do..
    i have a file browse control and a text field. when user selects a file, selected fiel's name (without file type extension) should be set to text field.
    I tried adding a dynamic action to file browse control's change event and within pl/sql Set Value logic i queried the wwv_flow_files and tried to return the file name it didn't work. i got no data found error. i assumed file is being inserted into wwv_flow_files when a page submission happens.
    In my second approach within the SetValue pl/sql logic i got the file browser control's (by directly accessing field, not by querying wwv_flow_files)value and did some string manipulation and tried to return only the file name. yet i got the same no data found error.
    Any idea how can i implement this ?
    Thanks in advance.
    - kurubaran

    Hi,
    I think PL/SQL approach will not work before you submit data to database.
    Have you think use $v function to get value from file browser?
    http://docs.oracle.com/cd/E23903_01/doc/doc.41/e21676/javascript_api.htm#BGBGDGIH
    Regards,
    Jari
    My Blog: http://dbswh.webhop.net/dbswh/f?p=BLOG:HOME:0
    Twitter: http://www.twitter.com/jariolai

  • File Browse Validation not stopping upload

    Hi Guys,
    I am using Apex 4.0 and need help with the following please:
    I have a file browse item which uploads a file into the built in WWV_FLOW_FILES. The problem is it uploads even when there is an error and my validation flags up.
    Is it supposed to, does anyone no a work around? Basically I dont want the end user to upload the same file more than once.
    Thanks in advance all
    Spam

    I have a file browse item which uploads a file into the built in WWV_FLOW_FILES. The problem is it uploads even when there is an error and my validation flags up. Is it supposed to...Yes. The file data is just the same as any other form value, and has to be submitted and held in session state (in this case in <tt>APEX_APPLICATION_FILES</tt>) before APEX can do anything with it:
    {thread:id=902770}
    Basically I dont want the end user to upload the same file more than once.You'll have to perform some kind of validation check for this and if it fails, delete the unwanted file:
    {thread:id=1772863}

Maybe you are looking for