3 Replies Latest reply: Sep 26, 2013 12:05 AM by RamGowda RSS

    GO_BLOCK in post_change trigger

    RamGowda

      Hi,

       

      I have requirement like when i select one item from LOV, then based on that selected item we need to be default the values in other block. Plase help us on this.

       

       

      Thanks in Adavance,

      Ramesh

        • 1. Re: GO_BLOCK in post_change trigger
          Soofi

          Hi Ramgowda,

           

          In when validate item of the field use set item property to off the navigation.

           

          In the first datablock change the navigation style to 'Change Data Block'.

           

          Obviously if no items navigable in first datablock means then it will look for the next navigable item in the second datablock.

           

           

          Regards,

          Soofi

          • 2. Re: GO_BLOCK in post_change trigger
            CraigB

            RamGowda wrote:

             

            ...I have requirement like when i select one item from LOV, then based on that selected item we need to be default the values in other block. Plase help us on this.

             

            Ramesh,

            The Post-Change trigger does not allow the execution of Restricted built-ins.  The GO_BLOCK built-in is restricted.  For your requirement, it would be easier to use a Key-ListVal trigger on the item rather than use the Post-Change trigger.  The Key-ListVal allows all built-ins and will fire when your user invokes your LOV on the item.  Keep in mind that the Key-ListVal trigger will override default functionality so you will have to explicitly display your LOV in the trigger, but the trigger execution will pause while the LOV is displayed and will resume when the user selects a value from the LOV.  For example your Key-ListVal trigger would like something like:

             

             

            -- Sample Key-ListVal trigger --
            BEGIN
             List_Values;
             IF ( :YOUR_BLOCK.YOUR_ITEM IS NOT NULL ) THEN 
              -- Set the default values in your other block here...
             ELSE
              -- Display a message to the user to select a value from the LOV.
             END IF;
             END;
             
            

             

            Hope this helps,

            Craig...

            • 3. Re: GO_BLOCK in post_change trigger
              RamGowda

              Hi Craig,


              Thank you so much for your valuable information. Its working fine for my condition and we've use both funtion key-nextval and key-nextitem to over come for this type problem.


              I've followed like this

               

              In key-nextval trigger

              BEGIN 

              List_Values; 

              IF ( :BATCH_HEADER.PRODUCT_C IS NOT NULL ) THEN  

              -- calling function for defaule the value

              ELSE 

              message('pls select item');

              return;

              END IF; 

              END; 

               

               

              In key-nextitem

              -- calling function for defaule the value

               

               

              Then it'll work for all condition like ur LOV is in search mode.

               

               

              Thanks,

              Ramesh