Skip to Main Content

Oracle Forms

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How check duplicate record at block level in Oracle forms

User_KVV1CAug 9 2019 — edited Aug 10 2019

Hi All,

My Scenario is like i have a block which shows customerid, orderid, active/inactive checkbox.

one customer can have multiple orders(severals rows).

objective is to select multiple customer (using the checkbox) and make them inactive.

BUT user cant make inactive all the orders for a customer, atleast one should remain.

customerid      orderid      active/inactive(checkbox)

c1                     order1      A

c2                     order1      A   

c1                     order1      A

c1                     order1      A

c2                     order1      A

c3                     order1      A

here we have 3 c1 (among this user should be able to inactivate ONLY any 2) . same goes for c2 (among 2 data for c2, one can be made inactive).

How to achieve this ? kindly help

I am using below logic

GO_BLOCK('blcok');

      first_record;

      LOOP

        IF :block.active/inactive = 'A'  THEN

          :Block.Databaseitem      := 'I';

        END IF;

        EXIT WHEN :SYSTEM.last_record = 'TRUE';

        next_record;

      END LOOP;

Regards,

Balaji

Comments
Post Details
Added on Aug 9 2019
3 comments
1,899 views