|
|
|
Re: oracle apex 5 tabular forms column to column calculation [message #656358 is a reply to message #656256] |
Mon, 03 October 2016 16:08 |
|
Littlefoot
Messages: 21823 Registered: June 2005 Location: Croatia, Europe
|
Senior Member Account Moderator |
|
|
This is a tabular form. You'll have to create a process which does the calculation.
First, run the form, right-click on "Unit Qty" and select "Inspect element". You'll see something like this:
<input id="f04_0001" name="f04" size=16 ... The important part here is "f04" so remember it.
Do the same for another two columns: "Price" and "Total".
Suppose that they are:
- Item name = f01
- Unit Qty = f04
- Price = f05
- Total = f07
It means that f07 = f04 * f05
Now, create a process: PL/SQL type; On Submit - After computations and validations; set Execution Scope to one of suggested values (either all submitted rows, or only modified ones); When button pressed = SUBMIT.
The process code should look like this; you're looping through all rows (represented by f01 - item name):
for i in 1 .. apex_application.g_f01.count loop
apex_application.g_f07(i) := apex_application.g_f04(i) * apex_application.g_f05(i);
end loop;
Run the page, fill required items, push the SUBMIT button. Total value *should* be calculated.
|
|
|