• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 364
  • Last Modified:

serial in form

i have one form master & details
details is based on table : det_trans
it contain column : line_no which should contain the serial number of each tabular entry
describ is the last field in det_trans
i put in post_text_item of that field this code


then it saved ok
but sometimes , only sometimes , when i update one or more record in that details
it send me message : unable to update record
i checked all codes , i quess there is mistake in my previous code

is there any other code i use it to give that serial ?
  • 7
  • 4
1 Solution

There can be a lot of reasons for that - it might be useful to know, why this error happens. So please also add the output of the 'show-error'-key (that may show the reason, why the record could not be updated).

Furthermore, do you always enter the describ-item? Because only then, the post-text-item-trigger is triggered. It may be useful to move that code to the POST-RECORD-trigger.

Best wishes
NiceMan331Author Commented:
i will try it
because i'm not always posting descrit
NiceMan331Author Commented:
post_record not solve the problem

add the output of the 'show-error'-key (that may show the reason, why the record could not be updated).

how to use it ?
The 14th Annual Expert Award Winners

The results are in! Meet the top members of our 2017 Expert Awards. Congratulations to all who qualified!


The key for showing Oracle Forms errors is depending on system settings, version and key mappings. You might try the combinations Shift+F1 or  Ctrl+Shift+E (maybe Ctrl+F1 shows the key mappings).
NiceMan331Author Commented:
it display an error that : constraint GL_PK vioilated
actually i'm not the owner of that  table
but when i view the constraint of it , i found the constraint gl_pk
but i don't know what is the column contain the primary key
it shows null as per the attached image
NiceMan331Author Commented:
sorry it fail to attached
any how here is its definition
constraint name : GL_PK
constraint type : primary key
owner : null
search condition : null
refernce table : null
Could you please post the output of following query:

select column_name, table_name from all_cons_columns where constraint_name = 'GL_PK';

Open in new window

Is this the master- or the detail-table?
NiceMan331Author Commented:
year , period , tr_code , tran_no , line_no
table name : gen_ledgers
it is details table for master table name : master_gen_ledger

the first 4 columns :  year , period , tr_code , tran_no are the links between master & details


before , i used to call that procedure post_text_item of : describt , as i mentioned before
but after your advice , i call it now on : post_insert  of the record level (gen_ledgers)

till now i didn't face any problem after changing the trigger , but let investigate the old records having problem ,  how to request the message inside the trigger to show the value of each 5 records mentioned above ?
Do you mean you want to show the values of each field?

message('Year: ' || :gen_ledgers.year); synchronize;
message('Period No.: ' || :gen_ledgers.period_no); synchronize;

And so on...
NiceMan331Author Commented:
yes , but not for all records
i would like this message to retrieve only for records making the primary key  vioileted
NiceMan331Author Commented:
still waiting
any replay ?
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

  • 7
  • 4
Tackle projects and never again get stuck behind a technical roadblock.
Join Now