Dynamically getting the value of a poplist
729625Nov 16 2009 — edited Nov 18 2009I have to get the value of a poplist. The form has multiple poplists and I only need to get the value of the poplist currently being processed. I've placed a code snippet below... There's more that the procedure has to do once it gets vNbr_PopListVal, but this is where I'm having trouble. The code below doesn't compile since its the wrong type. I know that if I knew the poplist name ahead of time, this would work:
vNbr_PopListVal := :control.PopList1;
But as I said, the poplist will not always be :control.PopList1. HELP!!!! What is the correct way to extract the value from the poplist? Thanks in advance.
PROCEDURE p_chk_poplist
(
pStr_PopListName VARCHAR2
)
IS
vItem ITEM;
vNbr_PopListVal NUMBER;
BEGIN
vItem := FIND_ITEM(pStr_PopListName);
-- Get value of the list item
vNbr_PopListVal := vItem;
END;