Skip to Main Content

APEX

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!

Check sum interactive grid

LuffyJul 7 2020 — edited Jul 9 2020

Hi everyone, I used the apex of 2020. I have one case as when create new interactive grid where column A is selected sum that must equal = 100. I used two cases but it was not unsuccessful.

- The first case, I tried to create validation for column but it was suitable for editing ( because recorded rows), with creating new, database has been not recorded,  so that validation has been not checked.

- The second case, I create a trigger for a table (new interactive grid) when after insert

CREATE OR REPLACE TRIGGER TRIGGER2

after INSERT OR UPDATE OF COLUMN A  ON TABLE

  declare

v_weight number;

BEGIN

       select nvl(sum(A),0)

    into v_weight

from TABLEgc

where gc.grading_id = v('GRADING_ID');

where v('GRADING_ID) - I create this item on applicaiton and assign to page item

     if v_weight <> 100 then

        raise_application_error(-20111,'This total must equal =  100%');

     end if;

END;

Thank you in advance. I hope everybody give me new idea or new skills.

This post has been answered by Keyser on Jul 8 2020
Jump to Answer
Comments
Post Details
Added on Jul 7 2020
4 comments
818 views