Skip to Main Content

APEX

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Passing rowid from tabular form to PLSQL procedure

CashyJul 10 2012 — edited Nov 1 2012
Hi Guys,

I have a tabular form which allows the user to update and create rows.

My form updates and creates box quantities for a warehouse system.

What I want to do is when the user creates a new box with a quantity of 10 be able to call a package that I have written to record that transaction in my transactions table and when a box quantity is reduced from 10 to 5 for example again create a transaction for it calling my package.

What I am struggling with is how to pass in the BOX_ID from the tabular form into my procedure with the ID of the row in the tabular form that I have updated / created.

For the updating of the box quantity I need the transaction be able to get the previous box qty and the new qty.

E.g

For a create:

New row added to the database with a qty of 5. Pass that new rowid and new box qty into my procedure which will handle the transaction creation.

For an update:
Old value 10, new value 5. Pass the rowid, old value and new value into my procedure which will handle the transaction creation.

The user could in theory add and update multiple records at once before they click the 'Submit' button. I have tried using table trigger but I would prefer to do it in the form if at all possible.

Hope that make some sense,

PS - I am using APEX v4.0

I have create a simple demo of what I am trying to achieve is at:

http://apex.oracle.com/pls/apex/f?p=17551:8

username guest1
password demo

There are 3 rows in the form, if the user changes the value of one box from 500 to 100, I want the form to pass to my procedure that the box value was 500 and been reduced to 100 for that box_id.

I also want the form to call the procedure when a new box is created passing in the qty of that new box.

Thanks in advance,
Chris
This post has been answered by Roel Hartman on Jul 10 2012
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 8 2012
Added on Jul 10 2012
2 comments
649 views