This post is about a simple requirement – How to count number of records in LOV ?
I have seen this type of threads on OTN forum so here I am writing about itWe can make use of LOV Accessor to count number of records in LOV as per selected source viewObject record, Here I am using Departments and Employees table of Oracle HR Schema
Now applied LOV on transient attribute (Created in Departments ViewObject) and passed Department Id in Lov Accessor to filter Employees list
LOV part is done, Now to count number of records in Lov I have added one more transient attribute in Departments viewObject and used LovAccessorName.count(“KeyAttributeName”) to populate transient value, this expression will calculate number of records in LOV as per selected Departments record
Now dropped this viewObject as form on page and see output
Moving to Next Record-
Now suppose if you want to disable lov when there is no records in list, for this just put a condition on lov component
Cheers 🙂 Happy Learning