1 Reply Latest reply on Aug 27, 2013 2:11 PM by CraigB

    Populating Master-Detail Block Data upon selection of LOV value

    Pavan 909

      Hi Everyone,


      I have a requirement to in Forms, where i need inputs. I used Oracle forms 10g.


      I have a LOV in control block, user has to select a value from the LOV and immediately upon selecting the LOV i do have to populate the details in master detail block below based on the selected LOV value.,


      I tried Post-Text-Item trigger to write code to populate the logic, but it says GO_BLOCK is restricted in Post-Text Item Trigger.


      Please suggest if there is any alternative to this logic.




        • 1. Re: Populating Master-Detail Block Data upon selection of LOV value

          Create a Key-ListVal trigger on your item that displays the LOV for you.  The trigger will pause execution while the LOV is displayed.  Once the user has selected a value from the LOV the trigger will continue executing where it left off.  This will allow you to set the Master block's WHERE clause based on the value selected from the LOV and allow you to go to the block and execute the query.  Your code will look something like the following:



          /* Sample Key-ListVal Trigger */
            END IF;


          This code sample assumes that you have already set the Default WHERE clause of your Master block and that your Master block has a relationship created between it and your Detail blocks.  If you have not set the default where property of your master block, then you will need to set it in the block properties or set it programatically using the Set_Block_Property() built-in.


          Hope this helps,