How to sum 2 columns in Interactive grid in Oracle APEX(2) using JavaScript Expression
HTML-код
- Опубликовано: 9 янв 2025
- set sal static id: sal
set comm static id:comm
create dynamic action:
event:
when sal,comm change
action:
setvalue :Javascript expression:
parseFloat($v('sal')==''? 0:$v('sal'),2)
parseFloat($v('comm')==''? 0:$v('comm'),2)
affected elements: Total
How to Automatically decrement from a predefined number when you click the Add Row button in the interactive grid in Oracle APEX...
ex, specifying a specific number in a cell, then when adding a new row, it gives us a warning that it is not possible to put a number higher than the specified “fixed” number...
Or show the remaining number from the process of subtracting the previously fixed number from the rows entered later, until a new entry is not accepted if the value of zero is reached from the fixed number.
thank you
Please take a look: ruclips.net/video/dzY8iLedmZU/видео.html
Is it possible to take sum of 2 columns from 2 different region?
Yes. I will post a new video about this. I'd like to know if you have business requirement about this? Usually we sum columns in one report. Thank you for your question
@@weililiu2119 Thank you for replying , i will explain .For eg: i have 2 Interactive grid A and B .Interactive grid A have “salary” column and interactive grid B have “increment column” ,i need to take the sum of these 2 columns and show in interactive grid B as "total" column. how can i achieve this ?
@@BinuKP-m3q Thank you for your explanation. I'd like to know you just sum the 2 columns without modifying(just reading) rather than sum the 2 columns when the 2 columns change? Usually what we do, get the salary cell value when IG row is selected to the page item and put the page item as hidden, then when I select one row in the report B, sum the page item and 'increment column' value to the column 'Total'.