Forum Stats

  • 3,855,272 Users
  • 2,264,496 Discussions
  • 7,905,956 Comments

Discussions

Checking if an item is visible in PL/SQL

tdobe
tdobe Member Posts: 193 Blue Ribbon

hi,

Does anyone know a method to check with PL/SQL if an item on a page is visible or not (e.g. hiding using Server-side Condition)?

thanks a lot

Tagged:

Best Answer

  • jariola
    jariola Member Posts: 10,854 Gold Crown
    Answer ✓

    This example might help

    declare
      l_exists boolean := false;
    begin
    
      for c1 in(
        select
          aapi.build_option_id
          ,aapi.condition_type_code
          ,aapi.condition_expression1
          ,aapi.condition_expression2
          ,aapi.authorization_scheme_id
        from apex_application_page_items aapi
        where 1 = 1
        and aapi.application_id = :APP_ID
        and aapi.page_id = :APP_PAGE_ID
        and aapi.item_name = 'PX_MY_ITEM'
      ) loop
        l_exists :=
          apex_plugin_util.is_component_used(
            p_build_option_id           => c1.build_option_id
            ,p_condition_type           => c1.condition_type_code
            ,p_condition_expression1    => c1.condition_expression1
            ,p_condition_expression2    => c1.condition_expression2
            ,p_authorization_scheme_id  => c1.authorization_scheme_id
          )
        ;
      end loop;
    
      if l_exists
      then
        htp.p('item exists');
      else
        htp.p('does not exist');
      end if;
    
    end;
    


Answers