sequence number to be diplayed in form [message #548900] |
Tue, 27 March 2012 00:43 ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
maggy_ashee
Messages: 70 Registered: May 2007
|
Member |
|
|
Hi Fellas,
In my form I have a submit button, when i click on it a sequence number to be generated and displayed in a text box.
I have created a sequence and tried inserting into table, it works fine however it's not getting displayed in form. Need your advice please.
Note: Tried giving sequence.sequence_name.nextval in initial value of the text box, didn't work showed FRM-11324 error.
--When button pressed--
DECLARE
v_seq number(20);
BEGIN
select seq_name.nextval
into v_seq
from dual;
insert into table_name
( rec1 , rec2 , rec3)
values
( v_seq , :block_name.rec2,
SYSDATE)
end;[/font]
|
|
|
Re: sequence number to be diplayed in form [message #548902 is a reply to message #548900] |
Tue, 27 March 2012 00:52 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
![](http://www.orafaq.com/forum/images/custom_avatars/72104.gif) |
Littlefoot
Messages: 21818 Registered: June 2005 Location: Croatia, Europe
|
Senior Member Account Moderator |
|
|
maggy_asheeTried giving sequence.sequence_name.nextval in initial value of the text box
Did you precede it with a colon sign? Should have been
:sequence.sequence_name.nextval
P.S. WHEN-BUTTON-PRESSED code: of course it doesn't show a value on the screen; you never told it to. It would if you put a sequence value into ":block.sequence_item" instead of "v_seq" (of course, you'd then INSERT the same, ":block.sequence_item" into a table.
[Updated on: Tue, 27 March 2012 00:54] Report message to a moderator
|
|
|
|
|
|
|
|
Re: sequence number to be diplayed in form [message #548972 is a reply to message #548900] |
Tue, 27 March 2012 06:47 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
maggy_ashee
Messages: 70 Registered: May 2007
|
Member |
|
|
go_item(:block_name.order_number);
set_item_property('TOIC_DISPUTE_FORMS.SUBMIT', enabled, PROPERTY_FALSE);
Tried with quotes as well. Still didnt work. No error messages too.
As per my requirement, Once i click on Submit button , it should go to disabled state.
|
|
|
|
Re: sequence number to be diplayed in form [message #548978 is a reply to message #548973] |
Tue, 27 March 2012 06:54 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
cookiemonster
Messages: 13937 Registered: September 2008 Location: Rainy Manchester
|
Senior Member |
|
|
Littlefoot wrote on Tue, 27 March 2012 12:50Cookiemonster: Item names need to be in quotes for calls to go_item
Spotted that as I pressed the submit button on my first reply. Takes a while for the brain to kick in sometimes.
|
|
|
Re: sequence number to be diplayed in form [message #548980 is a reply to message #548972] |
Tue, 27 March 2012 06:55 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
cookiemonster
Messages: 13937 Registered: September 2008 Location: Rainy Manchester
|
Senior Member |
|
|
maggy_ashee wrote on Tue, 27 March 2012 12:47go_item(:block_name.order_number);
That'll definitely give an error unless you have some code that masks errors. You're telling it to go to an item that has the name of the current value of :block_name.order_number.
|
|
|
|
|
|
|
|