Home » Developer & Programmer » Forms » form-40202 when focus on new field (Oracle 10g)
form-40202 when focus on new field [message #663550] Wed, 07 June 2017 23:24 Go to next message
Hatik
Messages: 12
Registered: June 2017
Junior Member
I have a block with data queried from db, as well as data entered by user in multi-record block, on the input field I have WHEN-NEW-ITEM trigger which initializes some of the hidden data of the current field. The problem is if i focus to the new field, then try to remove focus it will give me form-40202, because that field is mandatory. What I want to do is after user tries to leave the field use this kind of mechanism:
IF BLOCK_NAME.INPUT_NAME IS NULL THEN
  DELETE_RECORD;
END IF;
I have tried the code above in different triggers(POST-CHANGE, POST-TEXT-ITEM and some others) but it didn't work.

The problem also arises when I go to the given block, having 0 rows queried from db, now my cursor is focusing that field, which I can't remove focus from because of form-40202.

May be there is other way to do it?

P.S when I have a least one row from db, if I focus onto the new field and can't leave, I go the tool menu -> Record -> Delete. To leave the field, however it is not working if it is a block with 0 rows
Re: form-40202 when focus on new field [message #663553 is a reply to message #663550] Thu, 08 June 2017 01:38 Go to previous messageGo to next message
Littlefoot
Messages: 21690
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
What happens if you rename WHEN-NEW-ITEM-INSTANCE trigger to WHEN-VALIDATE-ITEM?
Re: form-40202 when focus on new field [message #663556 is a reply to message #663553] Thu, 08 June 2017 03:23 Go to previous message
Hatik
Messages: 12
Registered: June 2017
Junior Member
nothing will change, it won't delete the record, if it is empty, it will give same 40202
Previous Topic: Simulating delete_record function
Next Topic: If ELSE
Goto Forum:
  


Current Time: Wed Dec 01 22:16:24 CST 2021