Results 1 to 2 of 2
  1. #1
    Join Date
    Mar 2009
    Posts
    5

    Unanswered: [IF CONIDTION and PL/SQL] - Forms Builder

    Hi,
    I want to develop a PL/SQL statement in Oracle Forms Builder 6i.

    Description: The function of this trigger is to enable a button after a certain period and then disable it after rest of the period. I want it by date + months without the year specification.

    My questions:
    Is the the Trigger on the Function-Level (WHEN-BUTTON-PRESSED) or Block-level (WHEN-NEW-FORM-INSTANCE)?

    This is my try on PL/SQL Function-Level (WHEN-BUTTON-PRESSED)

    DECLARE
    SYSDATE := SUBMISSION_DATE;

    BEGIN

    IF SUBMISSION_DATE BETWEEN 1- APR AND 10-APR THEN

    ENABLE :EMP_HOME.PUSH_BUTTON106;
    ELSE
    DISABLE :EMP_HOME.PUSH_BUTTON106;
    END IF;
    END;

    Can someone help me in developing the code?
    Please!

  2. #2
    Join Date
    Jan 2004
    Location
    Croatia, Europe
    Posts
    4,094
    Provided Answers: 4
    Huh.

    I'm afraid that you'd rather read some PL/SQL documentation, just to get the general idea of how a PL/SQL block looks like (declaration section, use of DATE datatype (pay attention to the TO_DATE function), ...).

    Then read your Forms manual (if you don't have any, Forms Online Help system will be OK). In there, you'll need the SET_ITEM_PROPERTY built-in.

    It appears that WHEN-NEW-FORM-INSTANCE is a better choice than WHEN-BUTTON-PRESSED trigger.

    Finally, when you've done with all of that, you will be capable of producing a much better code than the one you have provided now (because this almost isn't worth reading).

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •