---
title: "Discussion on \"APEX Interactive Grid - Processing Selected Records\" | Hashnode"
description: "Discussion on \"APEX Interactive Grid - Processing Selected Records\". Learn how to process records selected in an Oracle APEX Interactive Grid from PL/SQL and SQL."
url: "https://hashnode.com/posts/apex-ig-processing-selected-records/63a30669502862b208ce3c3c"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [APEX Interactive Grid - Processing Selected Records](https://blog.cloudnueva.com/apex-ig-processing-selected-records?utm_source=hashnode&utm_medium=feed)

Learn how to process records selected in an Oracle APEX Interactive Grid from PL/SQL and SQL.

Dec 21, 2022 · 8 min read · blog.cloudnueva.com  
Updated Jan 17, 2025  
Read the article

-   [#oracle](https://hashnode.com/tag/oracle)
-   [#orclapex](https://hashnode.com/tag/orclapex)

## Written by

[Jon Dixon](https://hashnode.com/@orclapex)

@orclapex · San Diego, CA

  
[View profile](https://hashnode.com/@orclapex)

APEX, ORDS & the Oracle Database

I’m Jon Dixon, an Oracle APEX developer and consultant at Cloud Nueva. I write about APEX, ORDS, the Oracle Database, and how AI is changing the way we build software. This blog is where I share practical examples, lessons learned, and ideas from my work.

## Responses 10

Markdown supported · ⌘↵ to post

[Rahul Ghosh](https://hashnode.com/@rahulghosh)

[May 20, 2025](https://hashnode.com/posts/apex-ig-processing-selected-records/63a30669502862b208ce3c3c/comment/682c6da8eba53276cc167c1f)

This is the best answer I have seen so far. I loved it. It works so seemlessly even in mid-2025. I also added a "Submit Page" action after the complete message so that the page reloads and does not retain the selected records. Well I did this for my own use-case but thanks a lot! This was soooooooooo helpful <3

[Javier Reyez](https://hashnode.com/@Jay37)

[Apr 9, 2024](https://hashnode.com/posts/apex-ig-processing-selected-records/63a30669502862b208ce3c3c/comment/6615745dae6c3ca3d024edff)

Great article.

[Gregory Grimes](https://hashnode.com/@gpgrimes)

[Mar 18, 2024](https://hashnode.com/posts/apex-ig-processing-selected-records/63a30669502862b208ce3c3c/comment/65f872dc25f7da10535f962c)

Did I miss where you created the button and placed it in the IG region?

[Rahul Ghosh](https://hashnode.com/@rahulghosh)

[May 20, 2025](https://hashnode.com/posts/apex-ig-processing-selected-records/63a30669502862b208ce3c3c/comment/65f872dc25f7da10535f962c#reply-682c6fb8eba53276cc167c34)

He did not show that part cuz it is kinda obvious i guess. However, this solution is great, cheers!

[Gregory Grimes](https://hashnode.com/@gpgrimes)

[Mar 4, 2024](https://hashnode.com/posts/apex-ig-processing-selected-records/63a30669502862b208ce3c3c/comment/65e65a6225281fc0fb3797ad)

I always enjoy reading your posts. What I want to do as part of the processing is to generate GRANT statements. My IG query compares a list of existing grants and a list of objects needing grants. I'm planning to generate an IR with the grants statements which the user can download. Is there a better way to do this within APEX? The goal is to demonstrate to our team, rather than passing a round shared Excel files, APEX is a better way. I hate using Excel to consolidate info.

Thanks.

[Nat Asuah](https://hashnode.com/@Asuah)

[May 12, 2023](https://hashnode.com/posts/apex-ig-processing-selected-records/63a30669502862b208ce3c3c/comment/645e2b180d2cfe7dbccad8b7)

Hi Jon, I have been looking for a solution like this for a while and coming across your post, I thought I had struck Gold. Well, I did. Just a little comment on the "completion Message". The completion message is pop up irrespective of the outcome of the "Process Selected IDs". How do I link those events? Once again, thanks.

[Jon Dixon](https://hashnode.com/@orclapex)

[May 12, 2023](https://hashnode.com/posts/apex-ig-processing-selected-records/63a30669502862b208ce3c3c/comment/645e2b180d2cfe7dbccad8b7#reply-645e36210d2cfe7dbccadab8)

Hi Nat, Glad you liked the post. You could create another page item that is Hidden and Unprotected. In the 'Execute Server-side Code' step, populate that page item with a more specific message or some text that indicates that the completion message should not be displayed. In the Completion Message Javascript, put an if statement around the apex.message.showPageSuccess to either not display it or display the content of the new item. You could even use the JS API apex.message.showErrors to indicate an error occurred.

[Leon Match](https://hashnode.com/@LeonMatch)

[Feb 7, 2023](https://hashnode.com/posts/apex-ig-processing-selected-records/63a30669502862b208ce3c3c/comment/63e2cb694f69afd2796ce9b4)

[Jon Dixon](https://hashnode.com/@orclapex) Hi Jon, I implemented the solution described in your post, but I do have an issue - When I click on "Select All" checkbox in the header of APEX$ROW\_SELECTOR column, I only get the records visible (rendered) on page. Even though the total row count, in the footer of the grid, shows the count of all rows selected, the page item gets populated only with 50 ids. When I start scrolling down and click "Process Selected" button, I start getting more ids. How do I solve this? How can I get all grid's ids when Select All is checked?

Thanks again!

[Jon Dixon](https://hashnode.com/@orclapex)

[Feb 7, 2023](https://hashnode.com/posts/apex-ig-processing-selected-records/63a30669502862b208ce3c3c/comment/63e2cb694f69afd2796ce9b4#reply-63e2ce163e27fed24914f521)

Hi, for Fetch All, I recommend having a second button that says something like 'Process All'. Clicking this button would process all records regardless of what is selected. Have a second button that says something like 'Process Selected', which processes the selected records. You can fetch all records in the IG, but this could be very inefficient if you have lots of records. if you really want to fetch all records, this forum answer may help [forums.oracle.com/ords/apexds/post/interactive-gr…](https://forums.oracle.com/ords/apexds/post/interactive-grid-select-all-selects-just-40-records-5949)

[Leon Match](https://hashnode.com/@LeonMatch)

[Feb 7, 2023](https://hashnode.com/posts/apex-ig-processing-selected-records/63a30669502862b208ce3c3c/comment/63e26fb1cecce1c954adfc5b)

Hello Jon, Great post indeed. Very useful. One question though. Is it possible to process a row or rows when APEX$ROW\_SELECTOR check box is unchecked? In other words, unselected? Thank you, Leon

[Jon Dixon](https://hashnode.com/@orclapex)

[Feb 7, 2023](https://hashnode.com/posts/apex-ig-processing-selected-records/63a30669502862b208ce3c3c/comment/63e26fb1cecce1c954adfc5b#reply-63e2854acecce1c954ae001e)

Hi Leon, thank you for your feedback. Wouldn't it be easier (and more efficient) to pass the selected records to a PL/SQL API, then just process all the records NOT IN the selected list?

You can loop through all records in the IG using model.forEach and then see which ones are checked: [docs.oracle.com/en/database/oracle/apex/22.2/aexj…](https://docs.oracle.com/en/database/oracle/apex/22.2/aexjs/model.html#forEach)

Because you want all un-selected records, you will need to make sure you fetch all records from the server into the IG model. You can use this API to do this. Note: Depending on how many records you have, this may be very inefficient. [docs.oracle.com/en/database/oracle/apex/22.2/aexj…](https://docs.oracle.com/en/database/oracle/apex/22.2/aexjs/model.html#fetchAll)

[Tiago Luis Steil](https://hashnode.com/@tiagosteil)

[Jan 6, 2023](https://hashnode.com/posts/apex-ig-processing-selected-records/63a30669502862b208ce3c3c/comment/63b875aa624134a0c9b367dd)

Hi,

Thanks for the post, very good!

Do you have some solution where i can check all de records on the grid?

[Jon Dixon](https://hashnode.com/@orclapex)

[Jan 6, 2023](https://hashnode.com/posts/apex-ig-processing-selected-records/63a30669502862b208ce3c3c/comment/63b875aa624134a0c9b367dd#reply-63b8779d95025da0eecccc04)

Hi, I usually add a button called 'Process All' or something like that and then have that button call code to process all the eligible records. To select all in the Grid is inefficient and complex as you have to use JS.

[Tiago Luis Steil](https://hashnode.com/@tiagosteil)

[Jan 9, 2023](https://hashnode.com/posts/apex-ig-processing-selected-records/63a30669502862b208ce3c3c/comment/63b875aa624134a0c9b367dd#reply-63bc042720301ad1ecef3d4e)

[Jon Dixon](https://hashnode.com/@orclapex)

Hey,

Thanks a lot, this is the same solution I'm adopting

[mohankrishna kothapalli](https://hashnode.com/@mkkrish)

[Dec 22, 2022](https://hashnode.com/posts/apex-ig-processing-selected-records/63a30669502862b208ce3c3c/comment/63a4c6f43916c9c9a801e588)

very good post jon

[Jon Dixon](https://hashnode.com/@orclapex)

[Dec 23, 2022](https://hashnode.com/posts/apex-ig-processing-selected-records/63a30669502862b208ce3c3c/comment/63a4c6f43916c9c9a801e588#reply-63a5092f490dd1c9cd9c3cee)

Thank you, much appreciated.

[Jon Dixon](https://hashnode.com/@orclapex)

[Jan 10, 2023](https://hashnode.com/posts/apex-ig-processing-selected-records/63a30669502862b208ce3c3c/comment/63a4c6f43916c9c9a801e588#reply-63bcde401ec108d641925f66)

Thank you, glad you liked it.

[Jonathan Kearney](https://hashnode.com/@JonathanKearney)

[Dec 22, 2022](https://hashnode.com/posts/apex-ig-processing-selected-records/63a30669502862b208ce3c3c/comment/63a427d601686cc63761b70b)

Another excellent post, all very clearly explained as usual

[Jon Dixon](https://hashnode.com/@orclapex)

[Dec 22, 2022](https://hashnode.com/posts/apex-ig-processing-selected-records/63a30669502862b208ce3c3c/comment/63a427d601686cc63761b70b#reply-63a456dc3916c9c9a801d0b8)

Thank you Jonathan, much appreciated.
