Home » Developer & Programmer » Forms » sequence number to be diplayed in form (Oracle Apps/ 12i)
sequence number to be diplayed in form [message #548900] Tue, 27 March 2012 00:43 Go to next message
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 messageGo to next message
Littlefoot
Messages: 19350
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
maggy_ashee
Tried 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 #548923 is a reply to message #548902] Tue, 27 March 2012 04:10 Go to previous messageGo to next message
maggy_ashee
Messages: 70
Registered: May 2007
Member
Thanks much Little Foot. It worked, you r awesome. Am facing one more issue. Once clicked on SUBMIT, it should be Disabled. Please advice.
Re: sequence number to be diplayed in form [message #548924 is a reply to message #548923] Tue, 27 March 2012 04:11 Go to previous messageGo to next message
cookiemonster
Messages: 10860
Registered: September 2008
Location: Rainy Manchester
Senior Member
set_item_propety will do that.
You will need to use go_item to move the cursor somewhere else before disabling the button.
Re: sequence number to be diplayed in form [message #548953 is a reply to message #548924] Tue, 27 March 2012 06:29 Go to previous messageGo to next message
maggy_ashee
Messages: 70
Registered: May 2007
Member

go_item(:BLOCK_NAME.order_number);
set_item_property(:block_name.SUBMIT,ENABLED, PROPERTY_FALSE);

Above syntax didnt work.. Can you correct me if it's wrong?
Re: sequence number to be diplayed in form [message #548960 is a reply to message #548953] Tue, 27 March 2012 06:36 Go to previous messageGo to next message
cookiemonster
Messages: 10860
Registered: September 2008
Location: Rainy Manchester
Senior Member
Did you get an error?
what did it do?
Re: sequence number to be diplayed in form [message #548962 is a reply to message #548960] Tue, 27 March 2012 06:37 Go to previous messageGo to next message
cookiemonster
Messages: 10860
Registered: September 2008
Location: Rainy Manchester
Senior Member
Item names need to be in quotes for calls to go_item and set_item_property.
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 messageGo to next message
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 #548973 is a reply to message #548972] Tue, 27 March 2012 06:50 Go to previous messageGo to next message
Littlefoot
Messages: 19350
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Cookiemonster: Item names need to be in quotes for calls to go_item

Maggy Ashee: go_item(:block_name.order_number);

Where do you see quotes?
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 messageGo to next message
cookiemonster
Messages: 10860
Registered: September 2008
Location: Rainy Manchester
Senior Member
Littlefoot wrote on Tue, 27 March 2012 12:50
Cookiemonster: 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 messageGo to next message
cookiemonster
Messages: 10860
Registered: September 2008
Location: Rainy Manchester
Senior Member
maggy_ashee wrote on Tue, 27 March 2012 12:47
go_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.
Re: sequence number to be diplayed in form [message #548991 is a reply to message #548980] Tue, 27 March 2012 07:26 Go to previous messageGo to next message
owais_baba
Messages: 289
Registered: March 2008
Location: MUSCAT
Senior Member
Have u solved your problem


GO_ITEM('block.item');

-- Disable control
SET_ITEM_PROPERTY('block.xyz', enabled, PROPERTY_FALSE);


[Updated on: Tue, 27 March 2012 07:27]

Report message to a moderator

Re: sequence number to be diplayed in form [message #548997 is a reply to message #548973] Tue, 27 March 2012 07:59 Go to previous messageGo to next message
maggy_ashee
Messages: 70
Registered: May 2007
Member
yes i missed it... now it works fine for me... thx much cookiemonster..!!!
Re: sequence number to be diplayed in form [message #548999 is a reply to message #548997] Tue, 27 March 2012 07:59 Go to previous messageGo to next message
maggy_ashee
Messages: 70
Registered: May 2007
Member
owais_baba
thx it worked..!!!
Re: sequence number to be diplayed in form [message #549038 is a reply to message #548999] Tue, 27 March 2012 11:31 Go to previous messageGo to next message
maggy_ashee
Messages: 70
Registered: May 2007
Member
I just checked, Close is not working in my form. 'X', ONE NEXT TO Minimise and Maximise button. Any idea why?
Re: sequence number to be diplayed in form [message #549051 is a reply to message #549038] Tue, 27 March 2012 13:30 Go to previous message
cookiemonster
Messages: 10860
Registered: September 2008
Location: Rainy Manchester
Senior Member
Check when-window-closed and key-exit triggers.
Previous Topic: How to call a java function from Oracle forms?
Next Topic: How to Hide a Button while Runtime
Goto Forum:
  


Current Time: Sat Aug 02 00:29:10 CDT 2014

Total time taken to generate the page: 0.08310 seconds