2 Replies Latest reply on Aug 8, 2019 8:38 AM by Marwim

    Call Modal Window while processing records in a loop

    Marwim

      Forms version 12.1

       

      In a When-Button-Pressed trigger I loop through records of a cursor. For some of them I need a decision of the user. Therefore I try to open a modal window

       

      LOOP

        do something;

        IF condition THEN

          open modal window

          wait until window is closed

        END IF;

        do something else;

      END LOOP

       

      It should work like an alert where my program pauses until the alert is closed.

       

      Marcus

        • 1. Re: Call Modal Window while processing records in a loop
          Michael Ferrante-Oracle

          I believe what you want is possible, although it might take some tricky code.  Short of writing some ugly code you do have a few more simple options.  Which ever option you choose, you need to do something that results in a blocking state (e.g. an Alert, CALL_FORM, etc).  CALL_FORM might  be the best approach if the fixed responses of an Alert are not acceptable.  Create a new form and set the window property to Modal.  If you have several of these scenarios, you can create this extra form like a library and include a window and/or canvas for each case.  By passing in the desired parameters with CALL_FORM you can show the needed window.

           

          LOOP

            do something;

            IF condition THEN

              open modal window

              CALL_FORM ('myModalForm', NO_HIDE);

              wait until window is closed

            END IF;

            do something else;

          END LOOP