Suppose that the item you use to select a database is named P1_DATABASE
and its source is
select database_name d, database_id r
from list_of_databases
order by database_id;
and returns
DBLINK1, 1
DBLINK2, 2
DBLINK3, 3
as display/return values.
Create a LoV that utilizes UNION
, such as
select role d, role r
from dba_roles@dblink1
where :P1_DATABASE = 1
union all
select role d, role r
from dba_roles@dblink2
where :P1_DATABASE = 2
union all
select role d, role r
from dba_roles@dblink3
where :P1_DATABASE = 3;
which means: if you select dblink1
, its return value is 1
so the first SELECT
will return some values, while 2nd and 3rd won't. The same goes for other options you choose.
That's the general idea; modify it if necessary.