SlideShare une entreprise Scribd logo
1  sur  9
Télécharger pour lire hors ligne
9/25/21, 5:15 PM 2 ways to get total sum of Interactive Grid Column Oracle APEX - Ontoor Blogs
https://blogs.ontoorsolutions.com/post/2_ways_to_dynamicly_sum_grid_column/ 1/9
Home / Posts / 2 ways to get total sum of Interactive Grid Column Oracle APEX
2 ways to get total sum of Interactive Grid
Column Oracle APEX

Vikas Pandey  Feb 6, 2021
  2 min read
 Vikas Pandey APEX APEX
PLSQL SQL
How to Calculate total sum of interactive grid column into
page item in oracle APEX.
Most of the time, this question was asked by my friends and colleagues that “How to
Calculate total sum of interactive grid column into page item in oracle APEX” then i got
solution in two ways.
Solution 1.

Ontoor Blogs
9/25/21, 5:15 PM 2 ways to get total sum of Interactive Grid Column Oracle APEX - Ontoor Blogs
https://blogs.ontoorsolutions.com/post/2_ways_to_dynamicly_sum_grid_column/ 2/9
1. Need to create an editable interactive grid report using emp table and Page item
Px_ITEM.
2. Copy and Paste below code in “Function and Global Variable Declaration”.
(function($) {

function update(model) {

var salKey = model.getFieldKey("SAL"),

total = 0;

console.log(">> starting sum SAL column")

model.forEach(function(record, index, id) {

var sal = parseFloat(record[salKey]), 

meta = model.getRecordMetadata(id);

if (!isNaN(sal) && !meta.deleted && !meta.agg) {

total += sal;

}

});

console.log(">> setting sum SAL column to " + total)

$s("P23_TOTAL", total);

}

$(function() {



$("#emp").on("interactivegridviewmodelcreate", function(event, ui) {

var sid,

model = ui.model;

if ( ui.viewId === "grid" ) {

sid = model.subscribe( {



Ontoor Blogs
9/25/21, 5:15 PM 2 ways to get total sum of Interactive Grid Column Oracle APEX - Ontoor Blogs
https://blogs.ontoorsolutions.com/post/2_ways_to_dynamicly_sum_grid_column/ 3/9
Note: Defile region static id- “emp”.
Solution 2:
1. Now create a dynamic action on the SAL column of IG for change event.
onChange: function(type, change) {

console.log(">> model changed ", type, change);

if ( type === "set" ) {

if (change.field === "SAL" ) {

update( model );

}

} else if (type !== "move" && type !== "metaChange") {

update( model );

}

},

progressView: $("#P23_TOTAL") 

} );

update( model ); 

model.fetchAll(function() {});

}

});

});

})(apex.jQuery);


Ontoor Blogs
9/25/21, 5:15 PM 2 ways to get total sum of Interactive Grid Column Oracle APEX - Ontoor Blogs
https://blogs.ontoorsolutions.com/post/2_ways_to_dynamicly_sum_grid_column/ 4/9
2. Create a true action as Set Value. Set the type PL/SQL expression as :SAL and submit
the SAL.
3. Create another true action to execute JavaScript code and add the following code:
var model = apex.region("ONTOOR").widget().interactiveGrid("getViews", "grid").mo
var n_amt, n_totamt = 0;

col_amt = model.getFieldKey("SAL");

model.forEach(function(igrow) {

n_amt = parseInt(igrow[col_amt], 10);

if (!isNaN(n_amt)) {

n_totamt += n_amt;

}

});

apex.item("P23_TOTAL").setValue(n_totamt);



Ontoor Blogs
9/25/21, 5:15 PM 2 ways to get total sum of Interactive Grid Column Oracle APEX - Ontoor Blogs
https://blogs.ontoorsolutions.com/post/2_ways_to_dynamicly_sum_grid_column/ 5/9
We were unable to load Disqus. If you are a moderator please see our troubleshooting guide.
Demo
You might Like :
3 Ways to Open Inline Model Dialog Using JQuery In Oracle APEX
How to Create Dynamic Navigation Menu in Oracle APEX
Preserve Checkbox state while Paginating in Interactive/Classic Report Oracle APEX
< 
Add Tooltip on Side Navigation Menu Oracle
APEX
 >
APEX Camera Extension (ACE)
Related Posts
Refresh region of base page when closing modal dialog | Oracle APEX
3 Ways to Unselect Default Checkbox in Interactive Grid Oracle APEX
APEX page types | Universal Theme
Smooth row view Interactive report Oracle APEX
Handle trigger Mutating Error
0 Comments
- powered by
utteranc.es
Write Preview

Ontoor Blogs
9/25/21, 5:15 PM 2 ways to get total sum of Interactive Grid Column Oracle APEX - Ontoor Blogs
https://blogs.ontoorsolutions.com/post/2_ways_to_dynamicly_sum_grid_column/ 6/9
Vikas Pandey
APEX,PLSQL
 Ontoor
 India
 About
Featured Posts
APEX_JSON.WRITE_RAW
First Day of the YEAR : ROUND (DATE)
Download files in APEX
Generate DDL of any object in ORACLE

Styling with Markdown is supported
Sign in to comment

Sign in with GitHub

Ontoor Blogs
9/25/21, 5:15 PM 2 ways to get total sum of Interactive Grid Column Oracle APEX - Ontoor Blogs
https://blogs.ontoorsolutions.com/post/2_ways_to_dynamicly_sum_grid_column/ 7/9
Upload Multiple Files in Oracle APEX
Recent Posts
APEX_JSON.WRITE_RAW
First Day of the YEAR : ROUND (DATE)
Download files in APEX
Generate DDL of any object in ORACLE
Upload Multiple Files in Oracle APEX
How to upload multiple files in APEX
ORACLE INVISIBLE Column can be used for column ordering
How to find ORACLE locked Objects?
APEX APIs
Oracle Application Express JavaScript API Reference
Article publishers
Ashish Sahay Vikas Pandey Hugo Authors Anuj Kumar
Categories
APEX ORACLE PLSQL PLUGINS DBA JavaScript
GitHub SQL BLOGGER ORDS APEX_JSON CSS
SCRUM
APEX Plugins
121 53 6 1
109 27 15 10 6 5
4 4 3 3 2 1
1

Ontoor Blogs
9/25/21, 5:15 PM 2 ways to get total sum of Interactive Grid Column Oracle APEX - Ontoor Blogs
https://blogs.ontoorsolutions.com/post/2_ways_to_dynamicly_sum_grid_column/ 8/9
Dynamic Action Region
APEX Plugins
Dynamic Action Region
Short Codes
APEX SQL JAVASCRIPT PLSQL FILE_UPLOAD
Tags
APEX PLSQL SQL ORACLE PLUGINS TEMPLATES
Dynamic Action OntoorPlugins JavaScript API DBA
Classic Report APEX_JSON CSS MARKDOWN Universal Theme
APEX 21 BLOGGER GitHub ORDS PLUGIN UI
APEX+CSS apex.server APEX_COLLECTIONS APEX_DATA_PASER
APEX_WEB_SERVICE BOILERPLATES Coalesce DBMS_LOB
DOWNLOAD GOOGLE HTML Interactive Grid Interactive Report
ITEM JSON_TABLE RDS TEMPLATE THEMES UNESCAPE
WRITE_RAW AGILE APEX 20.1 APEX and CSS APEX COLLECTION
APEX_DATA_PARSER APEX_LANG APEX_SESSION apex_util
APEX_ZIP ATTACHMENT BLOB Cascade CHECKSUM CLOB
COLUMN_ORDERING CUSTOM DBMS_METADATA DDL Deleted
7 3
7 3
7 6 2 2 1
116 111 106 33 25 14
10 10 9 8 8
5 4 4 4 4
3 3 3 3 3 3
2 2 2 2
2 2 2 2
2 2 2 2 2
2 2 2 2 2 2
2 1 1 1 1
1 1 1 1
1 1 1 1 1 1
1 1 1 1 1

Ontoor Blogs
9/25/21, 5:15 PM 2 ways to get total sum of Interactive Grid Column Oracle APEX - Ontoor Blogs
https://blogs.ontoorsolutions.com/post/2_ways_to_dynamicly_sum_grid_column/ 9/9
Directory Emoji FILE_BROWSE FILE_UPLOAD FILES
Function IG Instagram Interactive Active INVISIBLE IR
JQUERY JS_API LOV Math MEGA MENU MULTIPLE_FILE
Navigation New line NULL NULLIF NVL NVL2
OBJECT OBJECT_LOCK ORA ORACLE_TO_XML PAGE
PAGE GROUP Page Zero PIPELINE POP UP LOV Privacy
REPLACE RSS SCRUM SELECT LIST Special Character
Sticky
          
  
Copyright © 2021 Ontoor Solutions. All Rights Reserved.
1 1 1 1 1
1 1 1 1 1 1
1 1 1 1 1 1
1 1 1 1 1 1
1 1 1 1 1
1 1 1 1 1
1 1 1 1 1
1

Ontoor Blogs

Contenu connexe

Tendances

Oracle HRMS Payroll Table Overview
Oracle HRMS Payroll Table OverviewOracle HRMS Payroll Table Overview
Oracle HRMS Payroll Table Overview
Chris Martin
 
Creating a Simple PHP and MySQL-Based Login System
Creating a Simple PHP and MySQL-Based Login SystemCreating a Simple PHP and MySQL-Based Login System
Creating a Simple PHP and MySQL-Based Login System
Azharul Haque Shohan
 

Tendances (20)

Sql loader good example
Sql loader good exampleSql loader good example
Sql loader good example
 
Oracle HRMS Payroll Table Overview
Oracle HRMS Payroll Table OverviewOracle HRMS Payroll Table Overview
Oracle HRMS Payroll Table Overview
 
Introduction to Oracle Fusion BIP Reporting
Introduction to Oracle Fusion BIP ReportingIntroduction to Oracle Fusion BIP Reporting
Introduction to Oracle Fusion BIP Reporting
 
07 Advanced RTF Template Techniques.doc
07 Advanced RTF Template Techniques.doc07 Advanced RTF Template Techniques.doc
07 Advanced RTF Template Techniques.doc
 
Creating a Simple PHP and MySQL-Based Login System
Creating a Simple PHP and MySQL-Based Login SystemCreating a Simple PHP and MySQL-Based Login System
Creating a Simple PHP and MySQL-Based Login System
 
Oracle R12 Apps - Order Management Tables & Descriptions
Oracle R12 Apps - Order Management Tables & DescriptionsOracle R12 Apps - Order Management Tables & Descriptions
Oracle R12 Apps - Order Management Tables & Descriptions
 
Infolets and OTBI Deep link Actionable Reports - Configuration Work Book
Infolets and OTBI Deep link Actionable Reports - Configuration Work Book Infolets and OTBI Deep link Actionable Reports - Configuration Work Book
Infolets and OTBI Deep link Actionable Reports - Configuration Work Book
 
The Goal with performance details Oracle Fusion Cloud
The Goal with performance details Oracle Fusion CloudThe Goal with performance details Oracle Fusion Cloud
The Goal with performance details Oracle Fusion Cloud
 
An introduction to SQLAlchemy
An introduction to SQLAlchemyAn introduction to SQLAlchemy
An introduction to SQLAlchemy
 
Oracle APEX Performance
Oracle APEX PerformanceOracle APEX Performance
Oracle APEX Performance
 
Oracle Forms Triggers
Oracle Forms TriggersOracle Forms Triggers
Oracle Forms Triggers
 
Prevent merging columns in excel output using rtf template
Prevent merging columns in excel output using rtf templatePrevent merging columns in excel output using rtf template
Prevent merging columns in excel output using rtf template
 
Setting up audits and audit reports Fusion Cloud
Setting up audits and audit reports Fusion Cloud Setting up audits and audit reports Fusion Cloud
Setting up audits and audit reports Fusion Cloud
 
Oracle Forms : Multiple Forms
Oracle Forms : Multiple FormsOracle Forms : Multiple Forms
Oracle Forms : Multiple Forms
 
Oracle Web ADI Implementation Steps
Oracle Web ADI Implementation StepsOracle Web ADI Implementation Steps
Oracle Web ADI Implementation Steps
 
Query Worker Contracts Details Oracle Fusion Cloud
Query Worker Contracts Details Oracle Fusion CloudQuery Worker Contracts Details Oracle Fusion Cloud
Query Worker Contracts Details Oracle Fusion Cloud
 
Oracle Personalization How To Restricting users from assigning items to diffe...
Oracle Personalization How To Restricting users from assigning items to diffe...Oracle Personalization How To Restricting users from assigning items to diffe...
Oracle Personalization How To Restricting users from assigning items to diffe...
 
Oracle Fusion Trees
Oracle Fusion TreesOracle Fusion Trees
Oracle Fusion Trees
 
Oracle XML Publisher / BI Publisher
Oracle XML Publisher / BI PublisherOracle XML Publisher / BI Publisher
Oracle XML Publisher / BI Publisher
 
Query Pre Payment details Oracle Fusion Cloud
Query Pre Payment details Oracle Fusion CloudQuery Pre Payment details Oracle Fusion Cloud
Query Pre Payment details Oracle Fusion Cloud
 

Similaire à 2 ways to get total sum of interactive grid column oracle apex ontoor blogs

Oracle OpenWorld 2011– Leveraging and Enriching the Capabilities of Oracle Da...
Oracle OpenWorld 2011– Leveraging and Enriching the Capabilities of Oracle Da...Oracle OpenWorld 2011– Leveraging and Enriching the Capabilities of Oracle Da...
Oracle OpenWorld 2011– Leveraging and Enriching the Capabilities of Oracle Da...
djkucera
 
Highlights and Challenges from Running Spark on Mesos in Production by Morri ...
Highlights and Challenges from Running Spark on Mesos in Production by Morri ...Highlights and Challenges from Running Spark on Mesos in Production by Morri ...
Highlights and Challenges from Running Spark on Mesos in Production by Morri ...
Spark Summit
 
Collaborate 2011– Leveraging and Enriching the Capabilities of Oracle Databas...
Collaborate 2011– Leveraging and Enriching the Capabilities of Oracle Databas...Collaborate 2011– Leveraging and Enriching the Capabilities of Oracle Databas...
Collaborate 2011– Leveraging and Enriching the Capabilities of Oracle Databas...
djkucera
 

Similaire à 2 ways to get total sum of interactive grid column oracle apex ontoor blogs (20)

Interactive Grid shortcodes - Ontoor blogs.pdf
Interactive Grid shortcodes - Ontoor blogs.pdfInteractive Grid shortcodes - Ontoor blogs.pdf
Interactive Grid shortcodes - Ontoor blogs.pdf
 
Building Robust ETL Pipelines with Apache Spark
Building Robust ETL Pipelines with Apache SparkBuilding Robust ETL Pipelines with Apache Spark
Building Robust ETL Pipelines with Apache Spark
 
Extending Oracle E-Business Suite with Ruby on Rails
Extending Oracle E-Business Suite with Ruby on RailsExtending Oracle E-Business Suite with Ruby on Rails
Extending Oracle E-Business Suite with Ruby on Rails
 
Tuning and optimizing webcenter spaces application white paper
Tuning and optimizing webcenter spaces application white paperTuning and optimizing webcenter spaces application white paper
Tuning and optimizing webcenter spaces application white paper
 
React & Redux JS
React & Redux JS React & Redux JS
React & Redux JS
 
Oracle OpenWorld 2011– Leveraging and Enriching the Capabilities of Oracle Da...
Oracle OpenWorld 2011– Leveraging and Enriching the Capabilities of Oracle Da...Oracle OpenWorld 2011– Leveraging and Enriching the Capabilities of Oracle Da...
Oracle OpenWorld 2011– Leveraging and Enriching the Capabilities of Oracle Da...
 
Oracle Database 12c Release 2 - New Features On Oracle Database Exadata Expre...
Oracle Database 12c Release 2 - New Features On Oracle Database Exadata Expre...Oracle Database 12c Release 2 - New Features On Oracle Database Exadata Expre...
Oracle Database 12c Release 2 - New Features On Oracle Database Exadata Expre...
 
"Frameworks in 2015" Андрей Листочкин
"Frameworks in 2015" Андрей Листочкин"Frameworks in 2015" Андрей Листочкин
"Frameworks in 2015" Андрей Листочкин
 
Alberto Maria Angelo Paro - Isomorphic programming in Scala and WebDevelopmen...
Alberto Maria Angelo Paro - Isomorphic programming in Scala and WebDevelopmen...Alberto Maria Angelo Paro - Isomorphic programming in Scala and WebDevelopmen...
Alberto Maria Angelo Paro - Isomorphic programming in Scala and WebDevelopmen...
 
Oracle Database 12c Release 2 - New Features On Oracle Database Exadata Expr...
Oracle Database 12c Release 2 - New Features On Oracle Database Exadata  Expr...Oracle Database 12c Release 2 - New Features On Oracle Database Exadata  Expr...
Oracle Database 12c Release 2 - New Features On Oracle Database Exadata Expr...
 
Unlocking the power of the APEX Plugin Architecture
Unlocking the power of the APEX Plugin ArchitectureUnlocking the power of the APEX Plugin Architecture
Unlocking the power of the APEX Plugin Architecture
 
Highlights and Challenges from Running Spark on Mesos in Production by Morri ...
Highlights and Challenges from Running Spark on Mesos in Production by Morri ...Highlights and Challenges from Running Spark on Mesos in Production by Morri ...
Highlights and Challenges from Running Spark on Mesos in Production by Morri ...
 
Using Rails to Create an Enterprise App: A Real-Life Case Study
Using Rails to Create an Enterprise App: A Real-Life Case StudyUsing Rails to Create an Enterprise App: A Real-Life Case Study
Using Rails to Create an Enterprise App: A Real-Life Case Study
 
Politics Ain’t Beanbag: Using APEX, ML, and GeoCoding In a Modern Election Ca...
Politics Ain’t Beanbag: Using APEX, ML, and GeoCoding In a Modern Election Ca...Politics Ain’t Beanbag: Using APEX, ML, and GeoCoding In a Modern Election Ca...
Politics Ain’t Beanbag: Using APEX, ML, and GeoCoding In a Modern Election Ca...
 
Collaborate 2011– Leveraging and Enriching the Capabilities of Oracle Databas...
Collaborate 2011– Leveraging and Enriching the Capabilities of Oracle Databas...Collaborate 2011– Leveraging and Enriching the Capabilities of Oracle Databas...
Collaborate 2011– Leveraging and Enriching the Capabilities of Oracle Databas...
 
Deep Dive of ADBMS Migration to Apache Spark—Use Cases Sharing
Deep Dive of ADBMS Migration to Apache Spark—Use Cases SharingDeep Dive of ADBMS Migration to Apache Spark—Use Cases Sharing
Deep Dive of ADBMS Migration to Apache Spark—Use Cases Sharing
 
Apache Spark 2.0: Faster, Easier, and Smarter
Apache Spark 2.0: Faster, Easier, and SmarterApache Spark 2.0: Faster, Easier, and Smarter
Apache Spark 2.0: Faster, Easier, and Smarter
 
SQLAlchemy Primer
SQLAlchemy PrimerSQLAlchemy Primer
SQLAlchemy Primer
 
Oracle apex training
Oracle apex trainingOracle apex training
Oracle apex training
 
Raybiztech Guide To Backbone Javascript Library
Raybiztech Guide To Backbone Javascript LibraryRaybiztech Guide To Backbone Javascript Library
Raybiztech Guide To Backbone Javascript Library
 

Dernier

The title is not connected to what is inside
The title is not connected to what is insideThe title is not connected to what is inside
The title is not connected to what is inside
shinachiaurasa2
 
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
masabamasaba
 
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 

Dernier (20)

%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
 
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
 
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdfPayment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
 
WSO2CON 2024 - Does Open Source Still Matter?
WSO2CON 2024 - Does Open Source Still Matter?WSO2CON 2024 - Does Open Source Still Matter?
WSO2CON 2024 - Does Open Source Still Matter?
 
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park %in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
 
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital TransformationWSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
 
The title is not connected to what is inside
The title is not connected to what is insideThe title is not connected to what is inside
The title is not connected to what is inside
 
WSO2CON2024 - It's time to go Platformless
WSO2CON2024 - It's time to go PlatformlessWSO2CON2024 - It's time to go Platformless
WSO2CON2024 - It's time to go Platformless
 
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park %in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
 
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
 
Harnessing ChatGPT - Elevating Productivity in Today's Agile Environment
Harnessing ChatGPT  - Elevating Productivity in Today's Agile EnvironmentHarnessing ChatGPT  - Elevating Productivity in Today's Agile Environment
Harnessing ChatGPT - Elevating Productivity in Today's Agile Environment
 
%in Soweto+277-882-255-28 abortion pills for sale in soweto
%in Soweto+277-882-255-28 abortion pills for sale in soweto%in Soweto+277-882-255-28 abortion pills for sale in soweto
%in Soweto+277-882-255-28 abortion pills for sale in soweto
 
8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students
 
%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
 
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
 
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
 
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
 

2 ways to get total sum of interactive grid column oracle apex ontoor blogs

  • 1. 9/25/21, 5:15 PM 2 ways to get total sum of Interactive Grid Column Oracle APEX - Ontoor Blogs https://blogs.ontoorsolutions.com/post/2_ways_to_dynamicly_sum_grid_column/ 1/9 Home / Posts / 2 ways to get total sum of Interactive Grid Column Oracle APEX 2 ways to get total sum of Interactive Grid Column Oracle APEX Vikas Pandey  Feb 6, 2021  2 min read Vikas Pandey APEX APEX PLSQL SQL How to Calculate total sum of interactive grid column into page item in oracle APEX. Most of the time, this question was asked by my friends and colleagues that “How to Calculate total sum of interactive grid column into page item in oracle APEX” then i got solution in two ways. Solution 1.  Ontoor Blogs
  • 2. 9/25/21, 5:15 PM 2 ways to get total sum of Interactive Grid Column Oracle APEX - Ontoor Blogs https://blogs.ontoorsolutions.com/post/2_ways_to_dynamicly_sum_grid_column/ 2/9 1. Need to create an editable interactive grid report using emp table and Page item Px_ITEM. 2. Copy and Paste below code in “Function and Global Variable Declaration”. (function($) { function update(model) { var salKey = model.getFieldKey("SAL"), total = 0; console.log(">> starting sum SAL column") model.forEach(function(record, index, id) { var sal = parseFloat(record[salKey]), meta = model.getRecordMetadata(id); if (!isNaN(sal) && !meta.deleted && !meta.agg) { total += sal; } }); console.log(">> setting sum SAL column to " + total) $s("P23_TOTAL", total); } $(function() { $("#emp").on("interactivegridviewmodelcreate", function(event, ui) { var sid, model = ui.model; if ( ui.viewId === "grid" ) { sid = model.subscribe( {   Ontoor Blogs
  • 3. 9/25/21, 5:15 PM 2 ways to get total sum of Interactive Grid Column Oracle APEX - Ontoor Blogs https://blogs.ontoorsolutions.com/post/2_ways_to_dynamicly_sum_grid_column/ 3/9 Note: Defile region static id- “emp”. Solution 2: 1. Now create a dynamic action on the SAL column of IG for change event. onChange: function(type, change) { console.log(">> model changed ", type, change); if ( type === "set" ) { if (change.field === "SAL" ) { update( model ); } } else if (type !== "move" && type !== "metaChange") { update( model ); } }, progressView: $("#P23_TOTAL") } ); update( model ); model.fetchAll(function() {}); } }); }); })(apex.jQuery);  Ontoor Blogs
  • 4. 9/25/21, 5:15 PM 2 ways to get total sum of Interactive Grid Column Oracle APEX - Ontoor Blogs https://blogs.ontoorsolutions.com/post/2_ways_to_dynamicly_sum_grid_column/ 4/9 2. Create a true action as Set Value. Set the type PL/SQL expression as :SAL and submit the SAL. 3. Create another true action to execute JavaScript code and add the following code: var model = apex.region("ONTOOR").widget().interactiveGrid("getViews", "grid").mo var n_amt, n_totamt = 0; col_amt = model.getFieldKey("SAL"); model.forEach(function(igrow) { n_amt = parseInt(igrow[col_amt], 10); if (!isNaN(n_amt)) { n_totamt += n_amt; } }); apex.item("P23_TOTAL").setValue(n_totamt);   Ontoor Blogs
  • 5. 9/25/21, 5:15 PM 2 ways to get total sum of Interactive Grid Column Oracle APEX - Ontoor Blogs https://blogs.ontoorsolutions.com/post/2_ways_to_dynamicly_sum_grid_column/ 5/9 We were unable to load Disqus. If you are a moderator please see our troubleshooting guide. Demo You might Like : 3 Ways to Open Inline Model Dialog Using JQuery In Oracle APEX How to Create Dynamic Navigation Menu in Oracle APEX Preserve Checkbox state while Paginating in Interactive/Classic Report Oracle APEX <  Add Tooltip on Side Navigation Menu Oracle APEX  > APEX Camera Extension (ACE) Related Posts Refresh region of base page when closing modal dialog | Oracle APEX 3 Ways to Unselect Default Checkbox in Interactive Grid Oracle APEX APEX page types | Universal Theme Smooth row view Interactive report Oracle APEX Handle trigger Mutating Error 0 Comments - powered by utteranc.es Write Preview  Ontoor Blogs
  • 6. 9/25/21, 5:15 PM 2 ways to get total sum of Interactive Grid Column Oracle APEX - Ontoor Blogs https://blogs.ontoorsolutions.com/post/2_ways_to_dynamicly_sum_grid_column/ 6/9 Vikas Pandey APEX,PLSQL  Ontoor  India  About Featured Posts APEX_JSON.WRITE_RAW First Day of the YEAR : ROUND (DATE) Download files in APEX Generate DDL of any object in ORACLE Styling with Markdown is supported Sign in to comment Sign in with GitHub  Ontoor Blogs
  • 7. 9/25/21, 5:15 PM 2 ways to get total sum of Interactive Grid Column Oracle APEX - Ontoor Blogs https://blogs.ontoorsolutions.com/post/2_ways_to_dynamicly_sum_grid_column/ 7/9 Upload Multiple Files in Oracle APEX Recent Posts APEX_JSON.WRITE_RAW First Day of the YEAR : ROUND (DATE) Download files in APEX Generate DDL of any object in ORACLE Upload Multiple Files in Oracle APEX How to upload multiple files in APEX ORACLE INVISIBLE Column can be used for column ordering How to find ORACLE locked Objects? APEX APIs Oracle Application Express JavaScript API Reference Article publishers Ashish Sahay Vikas Pandey Hugo Authors Anuj Kumar Categories APEX ORACLE PLSQL PLUGINS DBA JavaScript GitHub SQL BLOGGER ORDS APEX_JSON CSS SCRUM APEX Plugins 121 53 6 1 109 27 15 10 6 5 4 4 3 3 2 1 1  Ontoor Blogs
  • 8. 9/25/21, 5:15 PM 2 ways to get total sum of Interactive Grid Column Oracle APEX - Ontoor Blogs https://blogs.ontoorsolutions.com/post/2_ways_to_dynamicly_sum_grid_column/ 8/9 Dynamic Action Region APEX Plugins Dynamic Action Region Short Codes APEX SQL JAVASCRIPT PLSQL FILE_UPLOAD Tags APEX PLSQL SQL ORACLE PLUGINS TEMPLATES Dynamic Action OntoorPlugins JavaScript API DBA Classic Report APEX_JSON CSS MARKDOWN Universal Theme APEX 21 BLOGGER GitHub ORDS PLUGIN UI APEX+CSS apex.server APEX_COLLECTIONS APEX_DATA_PASER APEX_WEB_SERVICE BOILERPLATES Coalesce DBMS_LOB DOWNLOAD GOOGLE HTML Interactive Grid Interactive Report ITEM JSON_TABLE RDS TEMPLATE THEMES UNESCAPE WRITE_RAW AGILE APEX 20.1 APEX and CSS APEX COLLECTION APEX_DATA_PARSER APEX_LANG APEX_SESSION apex_util APEX_ZIP ATTACHMENT BLOB Cascade CHECKSUM CLOB COLUMN_ORDERING CUSTOM DBMS_METADATA DDL Deleted 7 3 7 3 7 6 2 2 1 116 111 106 33 25 14 10 10 9 8 8 5 4 4 4 4 3 3 3 3 3 3 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1  Ontoor Blogs
  • 9. 9/25/21, 5:15 PM 2 ways to get total sum of Interactive Grid Column Oracle APEX - Ontoor Blogs https://blogs.ontoorsolutions.com/post/2_ways_to_dynamicly_sum_grid_column/ 9/9 Directory Emoji FILE_BROWSE FILE_UPLOAD FILES Function IG Instagram Interactive Active INVISIBLE IR JQUERY JS_API LOV Math MEGA MENU MULTIPLE_FILE Navigation New line NULL NULLIF NVL NVL2 OBJECT OBJECT_LOCK ORA ORACLE_TO_XML PAGE PAGE GROUP Page Zero PIPELINE POP UP LOV Privacy REPLACE RSS SCRUM SELECT LIST Special Character Sticky               Copyright © 2021 Ontoor Solutions. All Rights Reserved. 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1  Ontoor Blogs