Home » Developer & Programmer » Forms » Delete Field
Delete Field [message #639353] Mon, 06 July 2015 07:40 Go to next message
palpali
Messages: 138
Registered: December 2014
Location: India
Senior Member
Hallo

Well, I am displaying my records in tabular form and want to delete one record in one column and i used when validate item Trigger but it does not work.
can you please help me, how can i do this or which Trigger should i use in this case?

my code

if (:block1.text is null) then
 message('field can not be empty');
raise form_trigger_failure;
end if;


Problem:
it did not Show any error message and let me delete this field.
any help please?
Re: Delete Field [message #639354 is a reply to message #639353] Mon, 06 July 2015 07:41 Go to previous messageGo to next message
palpali
Messages: 138
Registered: December 2014
Location: India
Senior Member
i wrote this Trigger in item level
Re: Delete Field [message #639357 is a reply to message #639354] Mon, 06 July 2015 07:48 Go to previous messageGo to next message
Littlefoot
Messages: 21808
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
What you wrote doesn't make sense. You can't "delete one record in one column". Code you posted doesn't "delete" anything either, but it suggests that you what to forbid users to leave that item empty. If that's so, forget about triggers - simply modify that item's "Required" property and set it to "Yes".

If that's not what you are looking for, please, describe the problem once again. Try to use correct terminology; provide an example, even a screenshot could help.
Re: Delete Field [message #639360 is a reply to message #639357] Mon, 06 July 2015 07:55 Go to previous messageGo to next message
palpali
Messages: 138
Registered: December 2014
Location: India
Senior Member
Hallo...

I am just trying to write when-item-validate Trigger in the particular text-item.
I mean, when user try to delete the record/or field then it should Shows a message that user not allowed to delete this field. so, may be i make bit clear?

and thank you for your Response Smile
Re: Delete Field [message #639362 is a reply to message #639360] Mon, 06 July 2015 08:00 Go to previous messageGo to next message
Littlefoot
Messages: 21808
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
OK then, modify data block's "Delete" property to "No" - it will prevent records to be deleted.

Previously mentioned "Required" item property would make sure that item has a value.

I still don't think that you need to involve a trigger.
Re: Delete Field [message #639363 is a reply to message #639362] Mon, 06 July 2015 08:04 Go to previous messageGo to next message
palpali
Messages: 138
Registered: December 2014
Location: India
Senior Member
Hi,
well it works to some extent, Smile but i would also like to Display one message when user want to delete record. is there any other solution to do this? i mean showing message or making alert

regards
Re: Delete Field [message #639374 is a reply to message #639363] Mon, 06 July 2015 09:20 Go to previous message
cookiemonster
Messages: 13920
Registered: September 2008
Location: Rainy Manchester
Senior Member
Use Key-delrec
Previous Topic: FRM-40513: ORACLE error: unable to get date/time from database.
Next Topic: summary column
Goto Forum:
  


Current Time: Thu Apr 25 09:54:15 CDT 2024