1 Reply Latest reply: May 16, 2012 8:56 AM by CraigB RSS

    Enable/disable zoom depending on some conditions

    557444
      Hi All,

      I am trying to enable zoom functionality by modifying the custom.pll.
      Click on zoom will take to a new form which has 2 fields carried over from the calling form.
      Now the requirement is "Only if there is a record in the called form the zoom should be enabled."
      I have added the following code in the custom.pll

      form_name varchar2(30) := name_in('system.current_form');
      block_name varchar2(30) := name_in('system.cursor_block');
      blk_status varchar2(10) := NULL;
      begin
      if (form_name = 'FNDPOMPO' and block_name = 'PROFILE_OPTIONS') then
      message('Inside If');
      blk_status := get_block_property(block_name, STATUS);
      message('Block status is ' || blk_status);
      if blk_status != 'NEW' then
      return TRUE;
      else
      return FALSE;
      end if;
      end if;
      end zoom_available;

      But I see the message "Inside If" and "Block status is NEW"
      When the form is opened, but when i query for the records, these are not displayed again.

      I tried adding the logic to the Event procedure in custom.pll.
      In the event function, if the event is zoom and the parameters to be passed to the new form are NULL...
      then a message is displayed on click of the zoom.
      But the zoom will still be enabled.
      How to disable the zoom itself when the parameters have no values?
      Please let me know how to get this done.