I want to make simple region: input field, button to send request to DB and read-only field to display result.
Here are the PL/SQL Code:
begin
select
edrpou || '; ' || nameorg || '; ' || short_name || '; ' || address || '; ' || boss
into :P206_SEARCH_RESULT
from dual
left join (
select * from (
select
trim(d.edrpou) edrpou,
trim(d.nameorg) nameorg,
trim(d.short_name) short_name,
trim(d.address) address,
trim(d.boss) boss,
d.date_d,
max(d.date_d) over (partition by trim(d.edrpou)) max_date
from edrpou_ d
where trim(d.edrpou) = :P206_EDRPOU_SEARCH and trim(d.short_name) is not null and d.isactual = 1
) e
where e.date_d = e.max_date
) on 1=1;
end;
Item P206_SEARCH_RESULT
is null after button click. I checked query, it's working in Developer.
I followed suggestion to reproduce issue on sample data and recreated it on free Apex workspace. At first I couldn't reproduce it, but then randomly found problem cause. Turns out problem is in item. It is of type "Textarea". If you leave everything by default - it works as intended. But if you set it's Height to 1 line - it's stops working! Item's value always null.
This is super weird, looks like a bug.