Home » Developer & Programmer » Forms » looking field after leaving the field (developer 6i second release)
looking field after leaving the field [message #296596] Mon, 28 January 2008 06:32 Go to next message
ashraf_al_ani
Messages: 92
Registered: October 2007
Location: Iraq
Member
Dear all

I have a field is connected to a sequence on a trigger when new item instance
i want to lock the field after the focus leave it in order no body can change the sequence
then when i press save button the field will be unlock in order the sequence will work again
pls how can i do such thing , waqiting for your advice

best wishes
Re: looking field after leaving the field [message #296599 is a reply to message #296596] Mon, 28 January 2008 06:36 Go to previous messageGo to next message
Littlefoot
Messages: 21823
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Why does anyone have to enter this item if its value is derived from a sequence? Make it disabled all the time!

Or, even better, write a database trigger which will do the job.
Re: looking field after leaving the field [message #296622 is a reply to message #296599] Mon, 28 January 2008 07:38 Go to previous messageGo to next message
rajy_salim
Messages: 204
Registered: January 2008
Location: Beirut - Lebanon
Senior Member
Or you can do it in the PRE-INSERT trigger on the form level, the field is always disabled.
Re: looking field after leaving the field [message #296625 is a reply to message #296596] Mon, 28 January 2008 07:44 Go to previous messageGo to next message
aneeshkumarkc
Messages: 3
Registered: January 2008
Location: India
Junior Member
u can lock by disable that item by using set_item_property after move cursor to next item
Re: looking field after leaving the field [message #296649 is a reply to message #296596] Mon, 28 January 2008 09:04 Go to previous messageGo to next message
rajy_salim
Messages: 204
Registered: January 2008
Location: Beirut - Lebanon
Senior Member
If the item is initialy enabled, and you disable it when moving to another item, you may face problems regarding that.
For example, if you open your form and execute query, the field is enabled and may be changed, so you can enter a value already entered or enter a value which is not the next value of the sequence, breaking by that your sequence. So its adviced to disable your item and either fill it in the PRE-INSERT trigger on the form level or BEFORE-INSERT on database level.
Re: looking field after leaving the field [message #296999 is a reply to message #296596] Tue, 29 January 2008 21:35 Go to previous message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
Just don't display the item.

David
Previous Topic: populate the date in list item (via PM)
Next Topic: How to execute ALTER SYSTEM command from Developer
Goto Forum:
  


Current Time: Mon Mar 10 19:25:49 CDT 2025