This morning, I was building a series of three LOVs. The first two display categories (parents and their children), and the third is supposed to display people associated with those categories. The parent (LOV #1) is required, the child (LOV #2) is optional. Simple issue, which is quickly dealt with by APEX’s Cascading LOV feature, right?
Well, it should have been. But when I ran the page, I found that the people (LOV #3) weren’t populated unless both of the other LOVs had values. If I selected the parent but not the child, no people were available to select from, even though the people’s SQL correctly used NVL.
Luckily, I noticed the “Optimize Refresh” attribute of the third LOV, which had defaulted to Yes. I didn’t remember what it actually did, but the help for it confirmed that if it’s set to Yes, APEX assumes that the list will be null if any of the parent values are null, and so doesn’t even bother running the query. Setting it to No resolved the issue.
Just wanted to say how helpful this was!
I’ve been looking around for a solution to a similar issue I was having and never would’ve thought to look at that property haha! Thanks very much for making this not to yourself .. and us :)
This is such a helpful post, helped resolved an issue i worked the whole day . Would have never imagined its the optimize refresh property. Thank you so much.
Hi David
I am unable to see the cascading lov property under lost of values. Any idea what could be the reason? I have select list working but not able to connect to its parent select list.
Thanks in advance.
Laxman
That was list of values not lost of values.:)
My guess is that you have the Page Item pane set to “Show Common”; at the top of the pane should be a series of buttons–the first one looks like three horizontal lines, and the second one is six. Selecting the second one (“Show All”) should make the Cascading LOV Parent Item(s) field visible.
Personally, I set mine to Show All and never went back.
To achieve this I used other way but it is long process.
The way you achieved by the option set to No is very easy and stanadard. thanks you so much.