Skip to Main Content

APEX

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

APEX Cards Not Displaying All Records from a View with ORDER BY DBMS_RANDOM.RANDOM

Pierre YottiMay 9 2025 — edited 6 days ago

Hello everyone,

I have created a view in Oracle with the following definition:

CREATE OR REPLACE FORCE VIEW V_TAB_DEPARTMENTS AS
SELECT id, name, location, country
FROM tab_departments
ORDER BY DBMS_RANDOM.RANDOM;

The goal is to display the department records in a random order each time.

The base table tab_departments contains 200 records. In Oracle APEX, I use the Cards region to display this data. I have:

  • Set the Data Source to the above view
  • Set the Pagination to display 200 cards per page
  • Assigned the primary key ID in the Card Attributes

However, the Cards component never shows all 200 records — sometimes only 10–160 cards appear. When I use the Interactive Report or Interactive Grid with the same view, all 200 records are displayed correctly.

Is there a known issue with the Cards component when using ORDER BY DBMS_RANDOM.RANDOM? Or is there a recommended approach to show all rows in random order using Cards in APEX?

Demo

Thank you in advance for your help!

Comments
Post Details
Added on May 9 2025
0 comments
114 views