pccdavef
pccdavef

Reputation: 79

Limiting rows initially returned in select list

Populating an Apex 5.1 select list of employees with about 25,000 names is proving to be a performance problem when loading the page. Is there a method of limiting the initial list to a set number (such as 200), and dynamically populating with chunks of additional names as the user scrolls through the list? Are there other options I should consider that would not slow down the page load?

I am currently using a dynamic LOV, and have tried adjusting this LOV to include Oracle row limiting code; however, there is no way of fetching past the initial set of rows. The source of the data is a view on a materialized view.

I appreciate any ideas

Upvotes: 0

Views: 361

Answers (2)

StewS2
StewS2

Reputation: 421

I'd use a pop-up LOV with a search function, not showing any records until the user enters a search value (more than 3 characters). I know it's tedious to use a pop-up LOV but it seems the only way to prevent waiting for a slow list to display.

Upvotes: 1

Littlefoot
Littlefoot

Reputation: 142705

I'd try with cascading lists of values. I don't know what those 25.000 names represent, but - suppose it is a large company. Then you'd

  • 1st LoV: continent
  • 2nd Lov: country
    • which refers to the previous LoV as where country.continent = :P1_CONTINENT
  • 3rd LoV: city
    • which refers the previous LoV as where city.coutry = :P1_COUNTRY
  • 4rd Lov is actually your current query:
    • which refers to the previous Lov as where person.city = :P1_CITY

Now your list of values wouldn't contain 25.000 rows, but - hopefully - a lot less.

Upvotes: 0

Related Questions