But it doesn't work. So what I need is a dynamic select list based on the row value.
-- Column FACILITY_ID -- LOV: select description display_value, ID return_value from FACILITY where id not in (select fk_facility_id from orders) or id = #FACILITY_ID# order by 1
Still second question is not answered: "If a selectlist value is already set within a row then this id should not be displayed in any other row."
-- Validation of Type: Function Returning Error Text DECLARE l_facility_ids varchar2(32000); l_facility_bez varchar2(200); l_error VARCHAR2 (4000); BEGIN FOR i IN 1 .. apex_application.g_f07.COUNT -- select list with facilities LOOP IF instr(':'||l_facility_ids||':',':'||apex_application.g_f07(i)||':')>0 THEN select description into l_facility_bez from facilities where id = apex_application.g_f07(i); l_error := l_error || '</br>' || 'Row ' || i || ': facility"' || l_facility_bez ||'" is already selected.'; END IF; l_facility_ids := l_facility_ids ||':'|| apex_application.g_f07(i); END LOOP; RETURN LTRIM (l_error, '</br>'); END;