I have created two select lists.one is parent another is child.
i can get the child list values correctly using cascading lov parent item
Eg: parent item values company name :x,y,z etc
x having 3 clients say a,b,c
there is no client for y
z having 2 clients say d,e
now i want to hide the child item once the parent having no child.
The moment when i select 'y' for the above example i want to hide the child item.
How can i do that?
You can do the following:
1. Create a hidden page item, say PX_HIDE_SHOW_FLG
2. Create a Dynamic Action of the type "Set Value" on the parent item to update PX_HIDE_SHOW_FLG. You can choose the "Set Type" as "PL/SQL Function Body". The function code should return 'Y' or 'N' based on the logic (count the number of children under the selected parent). You can trigger this DA on "change" of the parent item.
3. Now, create another DA on PX_HIDE_SHOW_FLG to hide/show the child LOV item based on its value. For, example, if value (of the hidden page item) = 'Y', then hide, else show.