Mosfet
Mosfet

Reputation: 35

Oracle : Execute Query with LOV selected value

I need to run a query with a value that is selected from a LOV.

I've got the next setup :

In order to run a query with the value selected from the LOV I've tried this :

My problem is that when pressing the button for the first time nothing happens, if I press the button a second time LOV window appears and the query is executed twice.

A GIF with the outcome:

Upvotes: 1

Views: 12916

Answers (1)

Elias Medeiros
Elias Medeiros

Reputation: 395

You don't need that enter_query call.

begin 
  if show_lov('LOV_MENIURI') then
    execute_query;
  end if; 
end;

When calling the execute_query built-in you'll fire the pre-query trigger, setting the where clause using the value returned by the LOV.

Upvotes: 3

Related Questions