1. Get rid of all advertisements and get unlimited access to documents by upgrading to Premium Membership. Upgrade to Premium Now and also get a Premium Badge!

Dynamic record group to filter selected values in a multirecord block from a LOV

Discussion in 'Oracle Forms and Reports' started by pramod.sramesh, Jul 9, 2013.

  1. pramod.sramesh

    pramod.sramesh Active Member

    Likes Received:
    Trophy Points:
    Hi Experts,

    I am working on Oracle forms 10g (Windows 7 OS).I have got one requirement to show one LOV for COLOR table. Say i have three colors BLACK, RED, BLUE in color table. Suppose in a multirecord block if a user selects BLACK from a lov for one record then for the next record lov it should show only RED and BLUE. How to filter the COLOR from a LOV record group query which are already selected?

    Pramod SR
  2. ac.arijit

    ac.arijit Forum Advisor

    Likes Received:
    Trophy Points:
    Kolkata, India
    Hi Pramod,

    Yes, its possible and would be pulled off by dynamically populating the record group at item instance level. You'll have to put this logic in the WHEN-NEW-ITEM-INSTANCE trigger or you'll have to populate the RG in KEY-LISTVAL and later validate it in WHEN-VALIDATE-ITEM trigger.

    But before you proceed with this approach, i'd like you to re-consider it and think "Do you really need to pull this off like this?". I mean the functional requirement (what i'm hinting/guessing) would be avoiding redundant data right? So i'd rather suggest you to validate the entries before commit and raise an exception in case of redundancy. This is much standardized and easy-to-handle approach.

    Drawbacks of the dynamic RG approach are:
    1. Performance would be hugely affected. As every time u navigate to the item it would regenerate the RG, no matter u wish to insert,update or view.
    2. U'll have to write multiple validation logic at multiple trigger points to again & again check the overall parity of the data.
    3. After doing so much also, there may be loopholes like suppose the user has mis-entered the values and wanna update the values. So, there probably user will be stuck up and won't have any other way except exiting from the form and re-entering freshly. It won't be much flexible and user-friendly.

    But in the end, its your call. So, u need to decide. If u still wanna go with the same then apply what i earlier told u.