See https://apex.oracle.com/pls/apex/f?p=65515:3
IG source query is
select
lep.profile_type,
lep.profile_value,
lep.description,
ep.profile_id,
ep.empno
from lov_emp_profile lep -- list of values
join emp_profile ep on ep.profile_id = lep.lov_emp_profile_id
where 1=1
and ep.empno = :P3_EMPNO
and lep.profile_type in ('TRAINING','CONFERENCE','CERTIFICATION')
IG save code is as follows.
declare
l_profile_id int;begin
case :APEX$ROW_STATUS
when 'C' then
-- First create a row in the LOV table and get the generated ID
insert into lov_emp_profile(profile_type,profile_value,description)
values (:PROFILE_TYPE,:PROFILE_VALUE,:DESCRIPTION)
returning lov_emp_profile_id into l_profile_id;
-- then add the row to the profile table
insert into emp\_profile (empno,profile\_id)
values (:P3\_EMPNO,l\_profile\_id);
-- what's being updated here is the list table
when 'U' then
update lov_emp_profile set
profile_type = :PROFILE_TYPE
,profile_value = :PROFILE_VALUE
,description = :DESCRIPTION
where lov_emp_profile_id = to_number(:PROFILE_ID);
when 'D' then
delete emp_profile
where 1=1
and profile_id = to_number(:PROFILE_ID);
delete lov\_emp\_profile
where lov\_emp\_profile\_id = to\_number(:PROFILE\_ID);
end case;
end;
Questions
When the IG has 2 rows, adding a new row either from scratch or using the [Duplicate row] function works fine. However, after the grid is Saved, the newly added row is not reflected in the grid! But the pagination does show 1-2 of 3. Clicking Go to refresh the grid fetches the 3rd row. Adding a Refresh DA on Save [Interactive Grid] event seems wrong.
If I start with 2 rows and delete 1 and save the row does get removed from the grid immediately but the pagination shows 1-2 of 1. Again, clicking Go to refresh the grid fixes things.
There is a [After Refresh] DA on the grid to refresh the Badge report (count of rows in the table). This DA does not seem to trigger
Any ideas? What am I missing? @john-snyders-oracle
Thanks