الأحد، 22 أغسطس 2021

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

 How to Change Item 

Autharization, Build Option ,Read only and Server side condtion 

on runtime in Oracle APEX

Make Item for 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 Autharization 

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 condtion

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;


thanks 



الأحد، 15 أغسطس 2021

How to change Region read only on runtime in Oracle APEX

 1: Make P6_REGION_ID

that will contain all Region available for your page 

use this code as source 

select 
PLUG_NAME,
ID
 from APEX_200200.wwv_flow_page_plugs
                    where FLOW_ID =:P6_FLOW_ID
                    and   PAGE_ID =:P6_STEP_ID

  and make process to update Region read only

 BEGIN

UPDATE APEX_200200.wwv_flow_page_plugs -- Region

SET PLUG_READ_ONLY_WHEN_TYPE = 'EXISTS' ,

    PLUG_READ_ONLY_WHEN = 'SELECT 1 from dual where 1 =2 '

WHERE FLOW_ID = :P6_FLOW_ID -- APP ID

 and PAGE_ID = :P6_STEP_ID  -- PAGE ID

 and ID = :P6_REGION_ID -- REGION ID

end;

thanks

How to change Region Serveer Side COndition on runtime in Oracle APEX

1: Make P6_REGION_ID

that will contain all Region available for your page 

use this code as source 

select 
PLUG_NAME,
ID
 from APEX_200200.wwv_flow_page_plugs
                    where FLOW_ID =:P6_FLOW_ID
                    and   PAGE_ID =:P6_STEP_ID

  and make process to update Region Server side condition 

 BEGIN

UPDATE APEX_200200.wwv_flow_page_plugs -- Region
SET PLUG_DISPLAY_CONDITION_TYPE = 'NOT_EXISTS' ,
    PLUG_DISPLAY_WHEN_CONDITION = 'SELECT 1 from dual where 1=2'
WHERE FLOW_ID = :P6_FLOW_ID -- APP ID
 and PAGE_ID = :P6_STEP_ID  -- PAGE ID
 and ID = :P6_REGION_ID -- REGION ID
end;

--
thanks

How to change Region Bulid Option on runtime in Oracle APEX

1: Make P6_REGION_ID

that will contain all Region available for your page 

use this code as source 

select 
PLUG_NAME,
ID
 from APEX_200200.wwv_flow_page_plugs
                    where FLOW_ID =:P6_FLOW_ID
                    and   PAGE_ID =:P6_STEP_ID

and select list item  P6_BUILD_OPTION

that will contain all build Option available for your APP

use this code as source 

select PATCH_NAME,ID from APEX_200200.wwv_flow_patches
                    where FLOW_ID =:P6_FLOW_ID
 

and make process to update Region Build Option

 BEGIN

UPDATE APEX_200200.wwv_flow_page_plugs -- Region

SET REQUIRED_PATCH = :P6_BUILD_OPTION  

WHERE FLOW_ID = :P6_FLOW_ID -- APP ID

 and PAGE_ID = :P6_STEP_ID  -- PAGE ID

 and ID = :P6_REGION_ID -- REGION ID; 

end;

--
thanks

How to change Region Authorization Scheme on runtime in Oracle APEX

1: Make P6_REGION_ID

that will contain all Region available for your page 

use this code as source 

select 
PLUG_NAME,
ID
 from APEX_200200.wwv_flow_page_plugs
                    where FLOW_ID =:P6_FLOW_ID
                    and   PAGE_ID =:P6_STEP_ID

and select list item  P6_SECURITY_ID

that will contain all Authorization available for your APP

use this code as source 

select NAME,ID from 
APEX_200200.wwv_flow_security_schemes
 where FLOW_ID =:P7_FLOW_ID

and make process to update Region Authorization 

BEGIN
UPDATE APEX_200200.wwv_flow_page_plugs 
SET PLUG_REQUIRED_ROLE = :P6_SECURITY_ID 
WHERE FLOW_ID = :P6_FLOW_ID 
 and PAGE_ID = :P6_STEP_ID  
 and ID = :P6_REGION_ID
end;

--
thanks

How to Solve Ords Issue : The request could not be mapped to any database.

 The request could not be mapped to any database.  Check the request URL is correct, and that URL to database mappings have been correctly c...