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!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

How to display row number in form?

Jimmy JKTMar 31 2011 — edited Mar 31 2011
Hi guys,
First I fll you in on the story so far..

I have a database data block named :V_PAYUPLOADHEADER_HP, in the property palette I set order by facility and warehouse.

I want to display row number for each fetched record, so I make :V_PAYUPLOADHEADER_HP.NUMB, which will contain the row number.


The following is some methods that I already tried:
- First I tried to make this field a database item=Y , column name = ROWNUM.
The result is the number jump around (3, 1, 2, 5, 4 etc. instead of 1, 2, 3, 4, 5) I think it is because of the order by that I set.
I have to keep this order by setting, so I look for another way to display the rownum.

- Next I tried to set database item = N, column name = null, calculation mode = formula, formula = :system.trigger_record.
When I run it all the value of :V_PAYUPLOADHEADER_HP.NUMB is 1. For all the records fetched is 1, 1, 1, 1 instead of 1, 2, 3, 4.

- I also tried using POST-QUERY trigger attached to the block.
In the trigger I have this code:
:V_PAYUPLOADHEADER_HP.NUMB := :system.cursor_record;
When I run it all the value of :V_PAYUPLOADHEADER_HP.NUMB is 1. For all the records fetched is 1, 1, 1, 1 instead of 1, 2, 3, 4..



Is there something that I missed?
What can I do to display the rownum?
This post has been answered by Ammad Ahmed on Mar 31 2011
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 28 2011
Added on Mar 31 2011
3 comments
7,009 views