Refresh [message #416381] |
Sat, 01 August 2009 05:10 ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
gozuhair
Messages: 206 Registered: January 2008
|
Senior Member |
|
|
Dear All
I have created a procedure related to disable update after a certain activity of updation,I have implemented this procedure on When Radio button changed trigger and when user change the radio button value from to then this procedure fire but the problem is that In a enter query mode when the user first time change the radio button value from to then this triger works well but when user one more time press the F7 button(Enter Query) and input query criteria then system still block the update even the radio button value is and show the message Field is protected against update,kinldly guide me how can i refresh my form into its original setting at the time of each .
|
|
|
|
Re: Refresh [message #416508 is a reply to message #416381] |
Mon, 03 August 2009 02:53 ![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) |
gozuhair
Messages: 206 Registered: January 2008
|
Senior Member |
|
|
Thanks for reply, Actually the problem is that i have to fire this trigger on both mode Enter query mode and Normal in case of radio button value is "confirm" .
I have fired this trigger on two places ,details are.
Procedure name=toolbar2
Item name = flag
item level
Trigger name = When radio change
Condition
DECLARE
alert_button NUMBER;
BEGIN
IF :ro_mst.flag = 'C'
AND :ro_mst.ro_no IS NOT NULL
AND :ro_mst.ro_cust_cd IS NOT NULL THEN
SELECT SYSDATE
INTO :ro_con_dt
FROM dual;
alert_button := Show_alert('alert_lock');
IF alert_button = alert_button1 THEN
--insert record into payment pending table
INSERT INTO ro_pay_pen
(ro_cust_cd,
ro_tot_amt,
ro_no,
ro_type_cd,
ro_con_dt,
ro_tot_prt,
ro_tot_lab,
ro_tot_lub,
ro_tot_other,
ro_tot_con,
ro_tot_sub,
ro_app_con,
org_cd)
VALUES (:ro_mst.ro_cust_cd,
:dummy.grandtotal,
:ro_mst.ro_no,
:ro_mst.ro_type_cd,
:ro_mst.ro_con_dt,
:RO_PART_DTL.sumtotalamountprt,
:ro_ope_dtl.sumtotalamountope,
:ro_lub_dtl.sumtotalamountlub,
:RO_PRT_DTL1.sumtotalamountprt1,
:ro_con_dtl.sumtotalamountcon,
:ro_sub_dtl.sumtotalamountsub_tax,
:ro_mst.apply_con,
:ro_mst.org_cd);
commit_form;
ELSIF alert_button = alert_button2 THEN
:ro_mst.flag := 'N';
END IF;
ELSE
:ro_con_dt := NULL;
:ro_mst.flag := 'N';
Show_common_message('Please Input Customer.......');
--go_item(:ro_mst.ro_cust_cd);
END IF;
Go_block('ro_mst');
END;
[/CODE]
[CODE]
Procedure name=toolbar2
block level
Trigger name = When new record instance
Condition
Begin
if :ro_mst.flag='C'
and :ro_mst.ro_no is not null
and :ro_mst.ro_cust_cd is not null then
[CODE]toolbar2;[/CODE]
end if;
End;
Kindly advice how can i fire this trigger on both mode if radio button value is 'Confirm' and then refresh my form into its original condition .
Regards
Zuhair
[Updated on: Mon, 03 August 2009 02:57] Report message to a moderator
|
|
|
|
Re: Refresh [message #416793 is a reply to message #416381] |
Tue, 04 August 2009 05:36 ![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) |
gozuhair
Messages: 206 Registered: January 2008
|
Senior Member |
|
|
Thanks for the reply,actually i have to update during a query because our business requirement is that in the morning we have to open the form and input the till now and in the evening we have to input and update other information into it through 'Enter query mode' and when the user finalize it and input and update all information then user click radio button value from 'Not confirm' to 'Confirm' and after that all blocks are freeze but the problem is that if the user change radio button value from 'Not confirm' to 'confirm' then first time its work well and freeze all block but 2nd time when we want to update another record by using 'enter query mode' then my form store all previous setting and and didnt allow user to change/update any value in the form and show the message [CODEfield is protected against update [/CODE] even radio button value is 'Not confirm',To acive my goal i have to exit my form and then reopen it and then system allow update but only for a 1 record so i have to exit form in order to update each record.Actually ideal system is that if system find radio button 'Not confirm' then system allow update in both mode and in case of radio button 'Confirm' then system disallow update.
As per your instruction i have written the following code but this code is not ideally work means at the time of 2nd record updation system still disallow update.
As per your instruction, I am using the follwing code on 'when new record instance (block leve)'
Begin
if :system.form_status<> 'NORMAL'
and :ro_mst.flag='C'
and :ro_mst.ro_no is not null
and :ro_mst.ro_cust_cd is not null then
toolbar2;
end if;
End;
kindly guide me how can i retrive my original setting/Refresh of my form.
Regards
Zuhair
[Updated on: Tue, 04 August 2009 05:56] Report message to a moderator
|
|
|
Re: Refresh [message #416802 is a reply to message #416793] |
Tue, 04 August 2009 06:12 ![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: 13963 Registered: September 2008 Location: Rainy Manchester
|
Senior Member |
|
|
gozuhair wrote on Tue, 04 August 2009 11:36 | Thanks for the reply,actually i have to update during a query because our business requirement is that in the morning we have to open the form and input the till now and in the evening we have to input and update other information into it through 'Enter query mode' and when the user finalize it and input and update all information then user click radio button value from 'Not confirm' to 'Confirm' and after that all blocks are freeze but the problem is that if the user change radio button value from 'Not confirm' to 'confirm' then first time its work well and freeze all block but 2nd time when we want to update another record by using 'enter query mode' then my form store all previous setting and and didnt allow user to change/update any value in the form and show the message [CODEfield is protected against update [/CODE] even radio button value is 'Not confirm',To acive my goal i have to exit my form and then reopen it and then system allow update but only for a 1 record so i have to exit form in order to update each record.
|
Congratulations, you win the prize for the longest sentance.
Try using shorter ones and we might actually be able to understand what you're trying to do.
And next time you post use the Preview Message button to see if you've got your code tags right.
|
|
|
|
Re: Refresh [message #416888 is a reply to message #416793] |
Wed, 05 August 2009 00:34 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) |
![](/forum/images/custom_avatars/67467.jpg) |
djmartin
Messages: 10181 Registered: March 2005 Location: Surges Bay TAS Australia
|
Senior Member Account Moderator |
|
|
Again, "This makes no sense to me. Why do you need to update during a query?" And don't say because 'they said so'. 'They' probably wouldn't know if their backsides were on fire in turns of how you code your form. As long as it LOOKS as through its in 'query' mode that's all they will care.
I don't understand what you are trying to do with your form and neither apparently do you. I suggest making contact with an experienced Forms programmer and getting them to walk through how form works with you.
David
|
|
|