Home » Developer & Programmer » Forms » Making form not to update, once inserted (processed) with msg (Oracle Forms 10g, windows 7)
Making form not to update, once inserted (processed) with msg [message #613021] Mon, 28 April 2014 23:55 Go to next message
afzaa2yahoocom
Messages: 24
Registered: April 2011
Location: Dubai
Junior Member
Hi All,

My Custom form captures the OverTime hours of the Employee each day of the month in XXOTHRS table, Once the month is processed the XXOTHRS has column named 'PROCESSED', it will update to Y for corresponding employee,month.

My requirement is if the employee for that month is processed (Processed = 'Y') then the employee of that month should not be updated, and to show msg that this emp is already processed.

Shall I try with database trigger on table...?

Kindly suggest.

Regards,
Afzal.

[Updated on: Mon, 28 April 2014 23:56]

Report message to a moderator

Re: Making form not to update, once inserted (processed) with msg [message #613024 is a reply to message #613021] Tue, 29 April 2014 00:15 Go to previous messageGo to next message
Littlefoot
Messages: 21805
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
How do your users update these values? Through this form only, or by some other tools as well (I suppose they don't use SQL*Plus, but - maybe some other form?). If so, a database trigger might be a better solution because - if there are several forms, you'll have to restrict access in all of them.

However, if it is just that form, a form trigger might be another option. I'd go with PRE-RECORD trigger which would check whether PROCESSED item is set to 'Y'. If it is, SET_ITEM_PROPERTY would modify UPDATE_ALLOWED property to FALSE. Otherwise, set it to TRUE (don't forget to do that because the first processed employee would cause all that follow to be non-updateable as well).
Re: Making form not to update, once inserted (processed) with msg [message #613025 is a reply to message #613024] Tue, 29 April 2014 00:24 Go to previous messageGo to next message
afzaa2yahoocom
Messages: 24
Registered: April 2011
Location: Dubai
Junior Member
Hi,

Thanks for the update. The user will use only this form to update the info.
There are more than 30 fields in the form, Shal I need to define all this fields in the pre-record trigger.

If so pls suggest.

Regards,
Afzal.
Re: Making form not to update, once inserted (processed) with msg [message #613034 is a reply to message #613025] Tue, 29 April 2014 01:06 Go to previous message
Littlefoot
Messages: 21805
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Yes, all of them, one by one. Start typing.

Alternatively, see whether SET_BLOCK_PROPERTY with UPDATE_ALLOWED does the job. You'd set the whole block non-updateable using only one command.

[Updated on: Tue, 29 April 2014 01:07]

Report message to a moderator

Previous Topic: upgrading forms6i. to 11g
Next Topic: Is it possible to generate Solaris compatible .fmx in windows?
Goto Forum:
  


Current Time: Tue Mar 19 04:18:37 CDT 2024