Home » Developer & Programmer » Application Express, ORDS & MOD_PLSQL » oracle apex 5 tabular forms column to column calculation (oracle apex 5)
icon8.gif  oracle apex 5 tabular forms column to column calculation [message #656241] Fri, 30 September 2016 01:39 Go to next message
ifti6650
Messages: 10
Registered: March 2015
Location: DHAKA
Junior Member
hi i am facing problem total := unit*price calculation in apex 5 universal theme.

Please help me.

Thanks

/forum/fa/13273/0/



[mod-edit: image inserted into message body by bb]
  • Attachment: apex5.JPG
    (Size: 26.89KB, Downloaded 2316 times)

[Updated on: Sun, 02 October 2016 23:52] by Moderator

Report message to a moderator

Re: oracle apex 5 tabular forms column to column calculation [message #656253 is a reply to message #656241] Fri, 30 September 2016 08:22 Go to previous messageGo to next message
joy_division
Messages: 4963
Registered: February 2005
Location: East Coast USA
Senior Member
When unit and price are null, you cannot expect a value for total.
Re: oracle apex 5 tabular forms column to column calculation [message #656256 is a reply to message #656253] Fri, 30 September 2016 09:44 Go to previous messageGo to next message
ifti6650
Messages: 10
Registered: March 2015
Location: DHAKA
Junior Member
I required to know the steps to do the calculation of the tabular forms of apex 5 both unit price have calculation based on valid numeric value.

[Updated on: Fri, 30 September 2016 09:45]

Report message to a moderator

Re: oracle apex 5 tabular forms column to column calculation [message #656358 is a reply to message #656256] Mon, 03 October 2016 16:08 Go to previous message
Littlefoot
Messages: 21806
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.
Previous Topic: Pop up dialog box for debug
Next Topic: using a javascript variable with PL/SQL procedure
Goto Forum:
  


Current Time: Thu Mar 28 09:02:08 CDT 2024