Change Autharization, Build Option ,Read only and Server side condtion for Item on runtime in Oracle APEX

Table of contents

No heading

No headings in the article.

First, Make an Item for the Items

select NAME,ID from APEX_200200.wwv_flow_step_items

where FLOW_ID = :P9_FLOW_ID

and FLOW_STEP_ID =:P9_STEP_ID

and ITEM_PLUG_ID =:P9_REGION_ID

Process for Authorization

BEGIN

UPDATE APEX_200200.wwv_flow_step_items -- ITEMS

SET SECURITY_SCHEME = :P9_SECURITY_ID -- Authorization schema

WHERE FLOW_ID = :P9_FLOW_ID -- APP ID

and FLOW_STEP_ID = :P9_STEP_ID -- PAGE ID

and ITEM_PLUG_ID =:P9_REGION_ID -- region region

and ID = :P9_ITEM_ID; -- item id

end;

Process for Build Option

BEGIN

UPDATE APEX_200200.wwv_flow_step_items -- Region

SET REQUIRED_PATCH = :P9_BUILD_OPTION

WHERE FLOW_ID = :P9_FLOW_ID -- APP ID

and FLOW_STEP_ID = :P9_STEP_ID -- PAGE ID

and ITEM_PLUG_ID =:P9_REGION_ID -- region region

and ID = :P9_ITEM_ID; -- item id

end;

Process for Read-only

BEGIN

UPDATE APEX_200200.wwv_flow_step_items -- ITEMS

SET READ_ONLY_WHEN_TYPE = 'EXISTS',

READ_ONLY_WHEN ='select 1 from dual'

WHERE FLOW_ID = :P9_FLOW_ID -- APP ID

and FLOW_STEP_ID = :P9_STEP_ID -- PAGE ID

and ITEM_PLUG_ID =:P9_REGION_ID -- region region

and ID = :P9_ITEM_ID; -- item id

end;

Process for Server side condition

BEGIN

UPDATE APEX_200200.wwv_flow_step_items -- ITEMS

SET DISPLAY_WHEN_TYPE = 'EXISTS',

DISPLAY_WHEN ='select 1 from dual where 1=2'

WHERE FLOW_ID = :P9_FLOW_ID -- APP ID

and FLOW_STEP_ID = :P9_STEP_ID -- PAGE ID

and ITEM_PLUG_ID =:P9_REGION_ID -- region region

and ID = :P9_ITEM_ID; -- item id

end;