I am trying to update a table using update query from oracle apex process. For that I needed a value to be fetch from a tabular form. But that feild is currently disabled (Not editable, value still exist), and here I'm getting error 'ORA-01403: no data found'. If I enabled that field then problem goes (But field will be editable, I don't want to make that field editable).
That data (data of disabled) is already being saved on table(before that field getting disabled). Now I've written a condition for bypassing that error (like. IF APEX_APPLICATION.G_F03(i) IS NOT NULL THEN). But still I'm getting this same error (mentioned above).
So as per shown in below code 'coz of apex_application.g_f03(i) is disabled it gives me error 'ORA-01403: no data found', whereas apex_application.g_f04(i) is not giving me any error. and if I enabled apex_application.g_f03(i) field, then error will be gone.
FOR i IN 1 ..apex_application.g_f01.count LOOP
if ((:P2_M1= 'f03') AND (apex_application.g_f03(i) IS NOT NULL)) then
------------------------------------------------------------------------------------
select count(*) into v_count from SCHEMA1.TABLE1
where ATTRIBUTE_CODE = apex_application.g_f02(i)
and header_id = :P2_X_HEADER_ID
and rating_001 is not null ;
------------------------------------------------------------------------------------
update SCHEMA1.TABLE1
set LAST_UPDATE_DATE = sysdate,
LAST_UPDATED_BY = :F2221_USER_ID,
RATING_001 = apex_application.g_f03(i),
STATUS = 'NEW'
where ATTRIBUTE_CODE = apex_application.g_f02(i)
and header_id = :P2_X_HEADER_ID;
--------------------------------------------------------------
END IF;
if ((:P2_M2 = 'f04') AND (apex_application.g_f04(i) IS NOT NULL)) then
------------------------------------------------------------------------------------
select count(*) into v_count from SCHEMA1.TABLE1
where ATTRIBUTE_CODE = apex_application.g_f02(i)
and header_id = :P2_X_HEADER_ID
and rating_002 is not null ;
------------------------------------------------------------------------------------
update SCHEMA1.TABLE1
set LAST_UPDATE_DATE= sysdate,
LAST_UPDATED_BY = :F2221_USER_ID,
RATING_002 = apex_application.g_f04(i),
STATUS = 'NEW'
where ATTRIBUTE_CODE = apex_application.g_f02(i)
and header_id = :P2_X_HEADER_ID;
------------------------------------------------------------------------------------
END IF;
end loop;
I expected either to get the value of this apex_application.g_f03(i) field (even if it is disabled) or bypass it.
This is standard behaviour of any HTML form, not just APEX. If any input is set to disabled then its value is not posted when the form is submitted. If you can set it to readonly instead then the user will still be unable to edit it, but its value will be posted on submit.