Home » Developer & Programmer » Forms » delete_record not removing record from screen
delete_record not removing record from screen [message #455973] Thu, 13 May 2010 21:01 Go to next message
coolguy01
Messages: 64
Registered: August 2006
Member
Hi I am trying to select a row on the screen and delete a individual row from the screen after hitting the delete button. Whenever i select the row it gets highlighted and also the alert box comes up asking if the record needs to be deleted. When I say yes I notice that the row does not get deleted. The code behind the delete button is as follows
(P.S the block is based of a table and commit_form works and changes are saved to db but not delete_record)


begin
--
Set_Item_Property('my_block.emp_no_copy',current_record_attribute,'va_delete_record');
Set_Item_Property('my_block.emp_LName_copy',current_record_attribute,'va_delete_record');
Set_Item_Property('my_block.emp_FName_copy',current_record_attribute,'va_delete_record');
Set_Item_Property('my_block.last_worked_date_copy',current_record_attribute,'va_delete_record');
--
synchronize;
Set_Alert_Property(alert_id, ALERT_MESSAGE_TEXT, 'Do you want to delete the Highlighted record? {NOT YET}');
alert_button := Show_Alert(alert_id);
IF alert_button=alert_button1 THEN
delete_record;
msg_info('The record has been successfully deleted');
END IF;

--
Set_Item_Property('my_block.emp_no_copy',current_record_attribute,'va_focus_record');
Set_Item_Property('my_block.emp_LName_copy',current_record_attribute,'va_focus_record');
Set_Item_Property('my_block.emp_FName_Copy',current_record_attribute,'va_focus_record');
Set_Item_Property('my_block.last_worked_date_copy',current_record_attribute,'va_delete_record');
--
--
end;
Re: delete_record not removing record from screen [message #455990 is a reply to message #455973] Thu, 13 May 2010 23:42 Go to previous messageGo to next message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
Try the 'synchronize' AFTER the 'delete_record'.

David
Re: delete_record not removing record from screen [message #456124 is a reply to message #455990] Fri, 14 May 2010 15:23 Go to previous messageGo to next message
coolguy01
Messages: 64
Registered: August 2006
Member
Hi,
I tried synchronize after the delete_record but the only difference is that it highlights the record I want to delete only after I say yes on delete button to delete. Thats the only difference if I change the synchronize to after delete_record.
Re: delete_record not removing record from screen [message #456129 is a reply to message #456124] Fri, 14 May 2010 15:38 Go to previous messageGo to next message
Littlefoot
Messages: 21818
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Then remove EVERYTHING but DELETE_RECORD and try again. First make it work, then make it fancy.
Re: delete_record not removing record from screen [message #456242 is a reply to message #456129] Sun, 16 May 2010 08:22 Go to previous message
SGORTON
Messages: 8
Registered: August 2009
Location: Washington DC
Junior Member
It may be that your 'delete record' is not being executed. Try putting in a message as follows:

IF alert_button=alert_button1 THEN
delete_record;
message('delete record command completed!');
end if;

I hope this has been helpful.

[Updated on: Sun, 16 May 2010 08:25]

Report message to a moderator

Previous Topic: URL report server path
Next Topic: Problem on search by character .
Goto Forum:
  


Current Time: Thu Sep 19 19:50:49 CDT 2024