Tabular form last row not accessible through PL/SQL

i am using apex 3.2
I have created one tabular form for daily receipt of material.
data get stared in table storereceipt. Now I have created one PL/SQL , it reads each row of tabular form one by one and update quantity of item in master table.
begin
FOR i IN 1 .. apex_application.g_f02.COUNT
LOOP
if apex_application.g_f12(i) != 'LOCK' then
update inv_ms_item set qty = qty apex_application.g_f11(i)+ this row update quantity in another table
where id = apex_application.g_f10(i);
end if;
END LOOP;
end;
problem arrives in last row, which was created blank with add row then data was entered and submit button was clicked.
my pl/sql is called on click of submit button . it updates all items except on last row.
remaining things works fine.
if i create 5 rows with add row and click one more time. last row will be blank. now if i click submit then all rows get updated and as last row is blank i dont have to care about it.
Edited by: TEJU on Oct 21, 2010 4:40 PM
Edited by: TEJU on Oct 21, 2010 4:40 PM

Hi ,
Teju this is the major drawback in the apex 3.2 because if u see the length when there is only one record is present in the tabular form
then the outpuyt u will get is undefined , but though the colum exists it wont .
i have faced this problem , one thing u can do is use document.getElementByID method of java script
first find out the length , that specifies how many rows are present then write a loop
for 1=0 till i<=-tahta length
document.getElemetByid('f01_00'+i)
/* this will give u f01_001 ...this can be ur element 1 , f01_002 this will ur element two .
I had already used it and its working fine...
Regards,
Nandini Thakur.

Similar Messages

  • Tabular Form - new row at top not working

    I'm trying to add a new row to the top of a tabular form (not manual) vs the bottom using Denes example - http://apex.oracle.com/pls/otn/f?p=31517:215 but it's not working. I absolutely need the records to sort on the date and time, but when I add a hidden column and sort it in descending order, then sort the date and time both in descending order, it doesn't sort correctly. I tried using the primary key field of the table as the hidden column, sorting nulls first, but the new record opens at the bottom (If I have "sorting nulls first" selected and at the time a new row is added the primary key field is null, why doesn't the new row open at the top?). I added a new field (date field with timestamp) to the query, then deselected "show" in the column attributes...that didn't work. I then selected "show", and changed the tabular form element display as to "Hidden", but then I got an error when I clicked "Add New", and I also added a column to my query via apex_item.hidden but no luck there either. What's the best way to go about this, but still maintain the date and time sort?
    Thank you,
    Tammy

    We did that. It didn't resolve it...
    Also, I compared the images directory from the complete apex 4.1.1. installation and compared it to patch 13331096 (latest 4.1.1 patch). They are identical.
    Any other ideas I can try out?

  • Setting default value of Tabular form item is not working

    Hi,
    I have a tabular form and in that I want to set the default value of the username to app_user. So in the default value of the item, I wrote v('app_user') and type Pl/SQL, but that does not seem to work. I tried the static application & page item with :app_user. That threw an error.
    Also, I wanted to populate the date field in one column. Doesn't sysdate work?
    Thanks,
    Sun

    Bob, I did read that. MY problem is that it is still not working. I am wondering if this is because the table is in execute query mode maybe? I am wondering if the default value needs to be added after the tabular data is populated through some other way? Maybe the default value would work only for static non database items?
    ThanksYou're right, I just tested that using the default setup on the column in report attributes and it did not work.
    I think you'll have to update the columns with the default value post query but I'm not sure exactly what you need to do.
    I have a form that has a weight entry column. I tried changing the query to set the default value in the query
    from..
    Select Weight
    From...
    to
    Select 999.99 Weight
    From...That appeared to work, but the 999.99 value was not populated back to the Database since it wasn't entered through the form UI. APEX maintains the entered values internally so it can do its checksumm processing and update modified rows back to the DB. I'm thinking you could update what needs to be updated using Javascript in a Dynamic Action, but I'm afraid I don't know how to do that.
    Excuse my incorrect assumption when first replying.

  • Tabular form LOV's not populating correctly on edit from report

    My form has four LOV's and several text fields. Two of the LOV's will not populate (contains null value) from the report when i try to edit the row, however the other two Lov's populate correctly. Any ideas why i can't get the lov's to populate with the correct value from the report?
    each LOV is set to display null value as -- choose value -- with no return value. when i click edit from the report the form (page 2) comes up with the corresponding values from the report, but as i stated two of the LOV's contain -- choose value -- instead of the correct value from the corresponding reports row. All four LOV's items are set exactly the same 2 being static and 2 dynamic; one of each not populating right.
    any help would be greatly appreciated.

    Hi
    I've not used popup lovs in tabular forms for a few years now, but if your using the apex_item's to generate your tab form then I think you need to allow an idx number for the pass back value. e.g. (I have left idx value 2 for the pass back value)
    SELECT
    APEX_ITEM.POPUPKEY_FROM_LOV (1,deptno,'DEPT') dt,
    APEX_HIDDEN(3, EMPNO) en
    FROM emp
    I hope that helps
    Shunt

  • Tabular form - Multi row delete error

    Apex 4.0.2
    We have a simple CRUD type of application on a bunch of tables built using Apex v1.6 that has, over the years, been upgraded to v4.0.2 and it is working mostly fine. It uses all out-of-the-box standard components, forms, classic reports, nothing too fancy. Recently one of the tabular forms started to misbehave, the multi-row-delete process raises a No Data Found error. The tabular form is based on a view with a INSTEAD OF trigger to handle the DML. Manually deleting the row in SQL*Plus works fine delete from mytab here pk_id = :pk_id but selecting the same row in Apex and clicking Delete raises the error.
    How does one go about troubleshooting & fixing this sort of thing? I tried re-saving the region in the Builder, exporting/importing the entire app, nothing. Running in Debug mode doesn't really provide any additional information, just that the MRD process failed. Tabular forms are the most frustrating, opaque component in Apex, wish they were easier to troubleshoot.
    Any ideas?

    Hello Vikas,
    >> How does one go about troubleshooting & fixing this sort of thing?
    By given us a bit more information :)
    • Is it a manual Tabular Form (using the ITEM API) or a wizard created one?
    • Are the Insert/Update operations work correctly? If not, what is the type of your PK column(s)?
    • If the problem is limited to the Delete operation, maybe the problem lies with the checkbox column. Are you sure that on page it is rendered as the f01 column?
    • As triggers are involved, can you save the PK that the trigger sees? Is it the expected value?
    • Are there any other processes that are fired before the DML process? If so, maybe the problem is with them. You can temporarily disable them and see if it change anything.
    >> Tabular forms are the most frustrating, opaque component in Apex, wish they were easier to troubleshoot
    Yes, I agree. However, I believe that 4.1 made some serious advancement where Tabular Form is concerned. Having simplified Tabular Form related Validations and Process should make things easier, and as a result, prone to less errors. Still, the main problem is that the type of error you are talking about is usually the result of metadata problems and these are indeed very hard to track.
    Regards,
    Arie.
    &diams; Please remember to mark appropriate posts as correct/helpful. For the long run, it will benefit us all.
    &diams; Author of Oracle Application Express 3.2 – The Essentials and More

  • Manual tabular form -- add rows

    Hi everybody, I am making a manually tabular form following the Denes Kubicek tutorials:
    http://apex.oracle.com/pls/otn/f?p=31517:170:1304244099066416::NO
    and
    http://apex.oracle.com/pls/otn/f?p=31517:190:1304244099066416::NO
    The SQL for the tabular form is:
    SELECT apex_item.checkbox (31,
    idint,
    'onclick="highlight_row(this,' || ROWNUM || ')"',
    NULL,
    'f31_' || LPAD (ROWNUM, 4, '0')
    ) delete_checkbox,
    idint,
    apex_item.text (32,
    tipus_modif,
    1,
    1,
    'style="width:20px" ',
    'f32_' || LPAD (ROWNUM, 4, '0')
    ) tipus
    FROM GPPC_DETALLS_ESMENA_PROP_V
    where esmena_idint = :P18_IDINT
    and tipus_modif ='A'
    The Report is created correct. Now I modify the "Form Region" template like this:
    <table class="t6FormRegion" id="MY_TAB" border="0" cellpadding="0" #REGION_ATTRIBUTES# summary="">
    <tr><td class="t6Header">#TITLE#</td></tr>
    <tr><td class="t6ButtonHolder">#CLOSE#   #PREVIOUS##NEXT##DELETE##EDIT##CHANGE##CREATE##CREATE2##EXPAND##COPY##HELP#</td></tr>
    <tr><td class="t6Body">#BODY#</td></tr>
    <tr><td><img src="#IMAGE_PREFIX#themes/theme_6/t.gif" width="400" height="1" alt="" /></td></tr>
    </table>
    Now I add a Button URL with the code:
    javascript:va_AddTableRow(this,'MY_TAB',1);
    and add this Javascript in the region header of the SQL Report
    <script>
    function va_AddTableRow(pThis,pThat,pNum){
    var tt = html_GetElement(pThat);
    for(i=0;i<pNum;i++){
    var ogTR = tt.rows[1];
    var trClone = ogTR.cloneNode(true);
    trClone.firstChild.innerHTML='(null)';
    var last_child=trClone.lastChild.getElementsByTagName('input')
    for (var j=0;j<last_child.length;j++)
    if (last_child[j].type=="hidden" && last_child[j].name=="f01")
    last_child[j].value="";
    if(document.all){
    myNewRow = tt.insertRow(tt.rows.length);
    oReplace = myNewRow.replaceNode(trClone);
    }else{
    tt.appendChild(trClone);
    </script>
    In this moment, when I push the botton appears the text (nulll) in the same region but not as a new line in the SQL report, what is the problem??
    Thank you for your help

    Alberto,
    When you get a chance, see if maybe this (old version) of my app does something similar to what you need/want.
    [http://apex.oracle.com/pls/otn/f?p=26115:3]
    It's not working right now though, I keep getting the Oracle error:
    ORA-01116: error in opening database file 17252 ORA-01110: data file 17252: '/u03/oradata/marvlprd/MARVLPRD/datafile/o1_mf_flow_172_23qtsjpr_.dbf' ORA-27041: unable to open file Linux Error: 23: Too many open files in system Additional information: 3
    So, as way of an explanation (until Joel gets the Linux process fixed), I have a simple little screen that I use for letting the users specifiy search criteria. Each line has four columns, what field they want to search, a condition (equals or not equals), the text to search for, and an optional 'And/or' argument. If the 'And/Or' gets populated, a new blank line automatically gets created. There is also a red 'X' on each line so they users can delete a line if they want.
    Not sure if this is what you need, but this page uses the same set of javascript code, so perhaps when it's working again, you can see if there are any similarities or differences.
    Also, for reference, so you can see the code and variables, etc., the workspace is wbfergus, and the id and password are both htmldb-apex.
    Bill Ferguson

  • Multiple Users - Tabular Forms - Multi Row Update.....

    Greetings All,
    Any comments, assistance, links, or even answers on the following situation would be much appreciated....
    I have a Application Express 4.0 (Could upgrade to 4.1 if it would help this issue)
    I have a wizard generated tabular form on a table, the form will show up to 600 records (rows) on a page.
    Part 1:
    The situation:
    User 1: Opens the form and brings up latest data set.
    User 2: Opens the form and brings up the latest data set.
    User 1: Changes data for record 1
    User 1: Hits submit. The data is saved.
    User 2: Changes data for record 1
    User 2: Changes data for record 2
    User 2: Hits submit. The following error is produced:
    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 = "3EE15D666E9DBDC59D34CE4CFB3950C0", item checksum = "922DA12AE1E3D8856695745C4D2830D2"., update "<Removed> Error Unable to process update.
    When this error occurs no updates get made to the table.
    I understand that row 1 can not be updated, however I would like row 2 (and all other rows where there is no conflict) to be updated. I would then like to be able to highlight in the form the rows that failed to update (And reload the data in them from the DB).
    Is this something I can achieve using my own MRU procedure, or in another way?
    Can anyone point me to a good example, tutorial or book showing how to do this.
    Thanks!

    Thanks for the comments guys.
    I have solved my issue in two different ways. Way one was not so clever, but worked, involving writing my own process for handling multi-row updates and would allow a user to fill in data for multiple rows (say 10) and have only the row with changed data rejected. V2 takes a very different approach, it uses Javascript, AJAX and the DOM model of the form to check when data is changed / updated by the user. Essentially, when a user enters an updateable form element, a AJAX request checks if the data has been changed. If it has, the value in the form is updated, and the color changed to blue to alert the user. When the user updates the data item, and AJAX request posts the new value to the database, where it is inserted. I had to build a bit of a framework to make this useable, and have to use dynamic sql in the database packages, but it work really well for what my users need! There are limitations (Currently it only supports date fields, text fields and drop down lists) but it works for me. It also involves traffic back and forth with the server each time a user moves the focus to a new form element, but it is a very light request and the work to do the select / updates in oracle is all based on a primary ke, so is ver quick.
    Solution 1: (Would need to be made much more elegant):
    1: Create a new text Item called P5_MESSAGE (To display error / success messages)
    2: Create a new process:
    DECLARE
    l_cks wwv_flow_global.vc_arr2;
    j pls_integer := 1;
    vUpdatedCount number := 0;
    vErrorCount number:=0;
    vMessage varchar2(4000):='';
    BEGIN
    select wwv_flow_item.md5(firstname,lastname,age) cks
    BULK COLLECT INTO
    l_cks
    from VA_TEST1 ;
    for i in 1..l_cks.count
    loop
    if htmldb_application.g_fcs(i) != l_cks(i) then
    -- Log error
    vErrorCount:=vErrorCount+1;
    vMessage:=vMessage||'Could not update row with ID:' || htmldb_application.g_f01(i) || '. This data has been updated by another user since you retrieved the data.<br>';
    else
    -- Do insert
    vUpdatedCount:=vUpdatedCount+1;
    update VA_TEST1
    set
    FIRSTNAME = replace(htmldb_application.g_f02(i),'%'||'null%',NULL)
    ,LASTNAME = replace(htmldb_application.g_f03(i),'%'||'null%',NULL)
    ,AGE = replace(htmldb_application.g_f04(i),'%'||'null%',NULL)
    where ID = htmldb_application.g_f01(i);
    end if;
    end loop;
    :P5_MESSAGE := vMessage;
    end;
    Note, this currently updates every row, even if the data is unchanged, this could be fixed by comparing the checksum of the data to be inserted with the checksum of the data in the table, if the same then no need to insert.
    Solution 2:
    Too complex to explain in detail here, if you need to implement this then let me know.

  • Tabular form delete button not quite working as it should

    Hello,
    Theres a little problem with the delete button on my tabular form. When I select the rows I want to delete with the checkboxes then click the button, it deletes the checked rows but it ALSO gets rid of all the rows that I haven't yet saved i.e. that I created while I was on that page, the same time I checked the boxes
    If I save the items then go back to the page and select them it works fine, but obviously the end users won't know to do that...
    Is there a way to stop this happening? It happens on all the tabular forms I have in my app...so presumably its a fairly common problem? but I can't find an answer on the interwebs...
    I did think maybe I could run the MRU process before the MRD process when I click the delete button as well as when I click the save button...but I thought I would ask an expert opinion before messing something up. It all works fine other than that...
    Thanks
    abarnybox

    Apple will not repair this problem, they will offer replacement iPhone 4S for $199, it will be exact perfect iPhone just like yours same color, GB everything. If you want to try Virtual Lock Button, tap Settings App > General > Accessibility > Assistive Touch > ON > tap new screen white button > tap Device > Lock. This can be used to turn OFF iPhone. To turn iPhone ON, connect to power, ie charger or USB of computer.

  • Last Row not added to XML Document

    Hi,
    I've created a transaction extracting data from SAP, trying to convert the data into a MII XML Document. But when i try to add the rows with the repeater block, it does not include the last record from the extracted SAP data.
    Description of the transaction:
    SAP function call
    MII XML Document
    Repeater (repeats on all items in the SAP output)
    ->MII XML Row
    ->Assign data to MII XML Row
    Assing XML Document to Transaction output property
    I have inserted a logger at the assignment action block, and the last SAP record is treated by the repeater block, but when i do a count on the SAP item elements and the converted Rows in the MII XML Document there is missing one record..
    Has any body had a similar problem and solved it some how??
    BR
    Jens

    Hi
    I think it is something to do with the technique you are using to add the rows.
    What you are doing is adding a blank row to the document, then populating the row action block (NOT the row in the document) with the first row from your repeater.
    You then run the row action block the second time, it has the data from the first repeater row, and then you populate the row action block with the second repeater row.
    So at the end you will have a rowset with 1 empty row and all but the last populated row from your repeater, plus a Row action populated with the last row from the repeater, but not added to your document.
    What you can do is either - move all your assignments into the Row object (definitely recommend this), or append the final row object to the document rowset before you assign it to your output.
    Hope this makes sense!
    Nick

  • Portal report - If rows returned are 1 greater than max,last row not shown

    We are experiencing what appears to be a bug with reports developed from a locally built Provider in Portal...
    If my "maximum rows to return" is set to 20, and my search returns 21 rows/results, the "next" button to navigate to the last row does not appear. Therefore, the last row is not returned to the user....
    We have been able to duplicate this with any number... For example, if we set the "max rows to be returned" to 59, and our results come back with 60 rows, neither the "next" button or last row are returned...
    Bug by chance?
    Thanks in advance for any help offered....
    ~Chris

    Hi Varsha,
    Please pay attention when you are requesting motnly period for
    start date : 1st July 2008
    end date : 1st july 2008
    After saving the period is changed to
    Start Date : 7/1/2008
    End Date  : 7/31/2008
    When you are requesting weekly period for the same interval, after sving the dates are changed again, according
    you settings of first day of the week. It it is Monday it could be as following
    Start Date : 6/30/2008
    End Date  : 7/6/2008
    So you are asking data for not quite the same period.
    Do you have data for monthly period in that interval?
    Regards,
    Victoria Gur

  • Xml file not generated through Pl/sql procedure as a concurrent executable

    Hi,
    I getting error while genarating xml file through Pl/sql procedure as a concurrent executable file.
    Error Message:
    The XML page cannot be displayed
    Cannot view XML input using XSL style sheet. Please correct the error and then click the Refresh button, or try again later.
    Invalid at the top level of the document. Error processing resource

    Hi,
    Make sure the file has the XML header:
    <?xml version="1.0" encoding="UTF-8"?>
    or similar.
    Regards,
    Gareth
    Blog: http://garethroberts.blogspot.com/

  • MSS HCM Forms and Processes - Not accessible

    Hi all,
    I was trying to enable all standard HCM forms and processes accessible in MSS. However, I could only see 'Transfer process' available while accessing using Manager user. I assigned SAP_ASR_MANAGER role to this user.
    All forms are active and accesible from WDA application from SE80 using a developer ID. However the same is not listed in MSS> Is there any other prerequisite which i am missing.
    Thanks
    Karthik

    answered myself

  • Data recovery options if drive not accessible through Target Disk Mode

    I have the classic data recovery question: my computer seems to have failed, and I'd like to save some data. Thanks in advance for any advice.
    Details:
    - Most recent backup was about a month ago to Time Machine (unfortunately, this laptop went off on a long trip and didn't have access to the destination disk, and then when it came home was running very slowly and my wife halted the TM backup thinking it was slowing the computer down). Some documents have been backed up more recently via Dropbox and/or Mozy, but not a couple important ones
    - When booted in Target Disk Mode, no drive shows up on the computer to which I connect it
    - When I boot from an OS X CD, a drive appears in Disk Utility with no volumes on it, and the options to 'repair disk' and 'verify disk' are greyed out.
    - When I try to just start the computer up, it gets to the grey screen with the apple and just spins.
    Questions:
    - Should I attempt anything else myself? I've never learned about Lion's Recovery Mode; can it be used to copy some data off, in the unlikely case that this computer would boot into that Mode? Would any further attempts to boot, etc. potentially reduce the chances of a professional company recovering data?
    - I'm planning to take this to an Apple Store today to confirm that this is indeed a hard drive problem and not a failed mother board or something; is there a way for me to do this myself? In the past I've used Hardware Test CDs from Apple and stuff; I don't know if those still work on modern computers.
    Thanks again for any help!

    I know I used to have a copy of Disk Warrior, but can't find it and it's probably out of date. I downloaded the Data Rescue demo, but it only got partway through scanning the disk and then failed. It told me to 'clone' the disk, but after about three days of trying still wasn't making much progress on it, so I gave up.
    However, I was able to recover the few important files I needed simply by removing the drive, putting it in an enclosure, and connecting it via USB. After 10 or 20 minutes, Finder gave me a message that said something like, "this disk cannot be repaired, and is probably damaged. You can still access the disk, but copy everything off ASAP because it will probably fail soon." Some files indeed couldn't be copied, but I could copy the things I needed.
    I assume that this is a hardware problem. To confirm, I assume that I can check it without having DiskWarrior simply by trying to reformat it? If it can't be reformatted, I assume there's no chance that it is a functioning drive. Is that right?

  • Nvarchar(max) of sql server 2005 is not accessible through Oracle DB Link

    hi,
    i have created the DB LINK from Oralce 11gR2 to MS Sql Server 2005,
    am able to access the view of Sql Server from Oralce,
    but the Columns which have Datatype nvarchar(max) in Sql Server am not able to access through DB Link.
    can anybody know about this issues?

    Pl do not post duplicate threads - Datatype nvarchar(max) not accessable (DB Link from Sql 2005 to Ora 11gR2 )

  • IPhone music not accessible through iTunes

    My phone is recognized on iTunes as a device, but all of the sudden there are no music tabs or playlist tabs--the main device tab is the only thing I can click on.  And I can't manage my music through iTunes anymore.  I just updated my iTunes and my iPhone software is up to date, but it did not fix the problem.  Any clues?

    Thanks for your response.  I have turned on iTunes Match in the Settings>Music.  I cannot find Setting>iTunes & App Stores.  I do see Settings>Store and within that setting Automatic Downloads Music and Apps which I have turned on.  I don't see anywhere else that iTunes Match is mentioned except Settings>Music.  Am I mising something?

Maybe you are looking for

  • RH8 crashes on converting RH7 project...

    ...please bear with me, this is long: I've successfully converted four significant RoboHelp 7 projects to RoboHelp 8 -- however, I have one that continuously, repeatedly crashes RoboHelp: the conversion itself crashes (maybe 2/3 of the way through),

  • Is there any way to prevent my SSIS Tasks from reformatting themselves when I want to change the Name

    So all my tasks are nicely laid out in my SSIS Package. Now I want to go add a blurb to the Name to make it a little more descriptive. When I do that, Microsoft Visual Studio just automatically re-sizes the task so the entire description, name fits.

  • AS2: NetStream .flv weird issue...

    I had a video playback using NetStream that worked perfect on Friday, then our IT Dep. switched servers on Friday night, and now it doesn't work. It will still play on my local files and when you open the .swf from the server, but it you try to go to

  • Retina Macbook Pro Fans

    I have an early 2013 15" Retina MBP. It's actually the second one I've had, the first had ghosting issues, which eventually led to the machine being replaced. When I'm using Skype and sharing my screen, the fans go crazy. Earlier they got up to 6,000

  • Using Vertical Spry Menus on Firefox

    I have tried to with inline CSS on ul tag to make the menus come closer together. My menus can go as deap as 5 levels and Firefox will cause the lower levels to move beyond the end of the screen at lower resolutions. Is there something that can be do