Home > Software design >  Adding a condition to desplay a list of values in Oracle Apex
Adding a condition to desplay a list of values in Oracle Apex

Time:07-02

I need help with putting a condition on a List Of Values in Oracle apex. So I have 2 tables:

SELECT v.ID_VEZ      NUMBER
       v.BROJ_VEZ,   NUMBER
       v.MAX_DULJINA FLOAT
       FROM VEZ v

and

SELECT b.ID_BRODICE            NUMBER
       b.REGISTRACIJA_BRODICE  VARCHAR2(50)
       b.DULJINA_BRODICE       FLOAT
       b.VEZ_FK                NUMBER
       FROM BRODICE b

The list of values displays v.BROJ_VEZ but returns v.ID_VEZ. The LOV is displayed in the form for the table BRODICE. I want the LOV to display only the v.BROJ_VEZ (returning v.ID_VEZ) where v.MAX_DULJINA > b.DULJINA_BRODICE. How do I do that ?. Is that even possible as a where clause in the LOV editor or do I need to make a dynamic action for it as the condition must be met only after my user wrote something in the form filed for b.DULJINA_BRODICE.

I'm 99% sure no one will understand what I want but I tried.

CodePudding user response:

Presume this is page P1. Duljina brodice is then entered into P1_DULJINA_BRODICE item. Vez LoV would then reference page item as

select v.broj_vez as display_value,
       v.id_vez   as return_value
from vez v 
where v.max_duljina > :P1_DULJINA_BRODICE

In order for it to properly work, scroll a little bit down (below the LoV query) and you'll see the Cascading list of values set of properties. Put P1_DULJINA_BRODICE into Parent Item(s) property.

(If query referenced some more page items, you'd name them all in "Parent Item(s)", comma-separated).

That should do it; you don't need dynamic action.

Sretan put i mirno more!

  • Related