Header Ads

Header ADS

Dynamic LOV or Conditional LOV In Oracle Apex

Dynamic LOV or Conditional LOV In Oracle Apex

Topic Introduction: In this tutorial, we will discuss Dynamic LOV on oracle apex or conditional LOV. Sometimes we need to get list data on a list item by a condition dependent on a Page Item. in this situation, a list of values returned by SQL is not capable. for this need to write PL/SQL code to apply the condition. description and an example have been given below about a list of the value of Supplier and Customer.





1. Take a Page Item Name such as P100_CUSTSUPP_TYPE where will give type(Customer/Supplier).
2. Take another page item for Dynamic LOV P100_CUSTSUPP where the customer or supplier list will be shown.
P100_CUSTSUPP: List of Value Type: Pl/SQL Function Body Returning SQL

Code for LOV

Declare 
  v_custsupp varchar2(1) := :P100_CUSTSUPP_TYPE;
Begin
  If v_custsupp = 'C' then
    Return 'SELECT CUSTOMER_NAME D,ID R FROM CUSTOMER_INFO';
  Else
     Return 'SELECT SUPPLIER_NAME D,ID R FROM SUPPLIER_INFO';
  End if;
End;




 

No comments

Theme images by Deejpilot. Powered by Blogger.