If you have only one 'Routing_set_name' displayed at a time then you could use the aggregation facility of Oracle Forms.

To get only one 'Routing_set_name' in a block I suggest using a master-detail relationship and only permit data entry in the detail block. You can then do a When-Validate-Item on the 'Percent' item that adds the current value to the aggregated value and fails if they are greater than 100%.

Unfortunately, the aggregate facilities don't exist in Forms 4.5 so we will have to use another method.

Please reread the Forms documentation. Basically, you should only use the 'ON-' triggers when working with non-Oracle databases. Unfortunately, you can't loop through the records in the 'Pre-' triggers so we have to come up with another method.

Do you have a table that will store the accummulated 'Percent'? I hope you don't as, from a database design point of view, it is highly redundant.

We could 'commit' after each record and then do a 'select' on the database and add the current record's value to it and then do the test. Alternatively, build a 'record_group' with the 'Routing_set_name' and accumulated 'Percent' and use it in the When-Validate-Item trigger on the 'Percent' field.

Do you have a table that will store the accummulated 'Percent'?
>> NO
I hope you don't as, from a database design point of view, it is highly redundant.
>> Correct

We could 'commit' after each record and then do a 'select' on the database and add the current record's value to it and then do the test.
>> Can you please explain how can get total? i mean...on which trigger i can total.

Alternatively, build a 'record_group' with the 'Routing_set_name' and accumulated 'Percent' and use it in the When-Validate-Item trigger on the 'Percent' field.
>> I will read for record_group how to create that? will give you an update if i found some things.

This is probably the simplest. Just remember to have a 'commit_form' in a 'Post-Record' trigger. You may wish to test if the record status is 'changed' before requesting the 'commit' otherwise you will get the message 'No changes to be saved' if you haven't changed anything.