Home » Developer & Programmer » Forms » Replacement for STANDARD TOOLBAR ROW DELETE
Replacement for STANDARD TOOLBAR ROW DELETE [message #295172] Mon, 21 January 2008 10:47 Go to next message
pc131
Messages: 36
Registered: May 2006
Member
Hi all,

I'm using Forms 6i and while I have to disable standard toolbar in my form(toolbar on which I can add or remove records in block etc...) I have to add regular button on form which will do record deletion. But since I check upon leaving every field in record if it isn't empty, the built-in procedure DELETE_RECORD won't work for me.

What procedure is being called when pressing on standard toolbar record deletion button?

Thanks in advance.
Tom
Re: Replacement for STANDARD TOOLBAR ROW DELETE [message #295255 is a reply to message #295172] Mon, 21 January 2008 21:51 Go to previous messageGo to next message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
Why doesn't it work? The standard delete IS 'delete_record'. I expect that it is working perfectly but it is your extra code which is causing the problem. Post your code but please format it and place it between code tags.

David
Re: Replacement for STANDARD TOOLBAR ROW DELETE [message #295324 is a reply to message #295255] Tue, 22 January 2008 02:21 Go to previous messageGo to next message
pc131
Messages: 36
Registered: May 2006
Member
Hi

Under the button DELETE_RECORD is trigger when-button-pressed which fires DELETE_RECORD procedure. But it does nothing. I enabled DEFAULT&SMARTBAR standard toolbar and deletion button from there deletes record under any circumstances. Even when current field is empty (look below).

Every field in my block has a trigger WHEN_VALIDATE_ITEM:

IF :SYSTEM.CURRENT_VALUE IS NULL THEN 
  MSG('Empty values are not allowed.'||CHR(10)
      ||'In order to proceed all fields in a row must be filled.'); 

RAISE FORM_TRIGGER_FAILURE;	

END IF;


It prevents from leaving field empty. When I started new record (4 varchar2 fields in every) I have to fill all fields to proceed or don't fill even one field.

Still DELETE_RECORD doesn't work.
Tom

[Updated on: Tue, 22 January 2008 22:24] by Moderator

Report message to a moderator

Re: Replacement for STANDARD TOOLBAR ROW DELETE [message #295335 is a reply to message #295324] Tue, 22 January 2008 02:48 Go to previous messageGo to next message
Littlefoot
Messages: 21823
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Quote:
... which fires DELETE_RECORD procedure

How does this procedure look like? Is it necessary? What's wrong with DELETE_RECORD built-in?
Re: Replacement for STANDARD TOOLBAR ROW DELETE [message #295356 is a reply to message #295335] Tue, 22 January 2008 03:29 Go to previous messageGo to next message
pc131
Messages: 36
Registered: May 2006
Member
under WHEN-BUTTON-PRESSED trigger there is code:

DELETE_RECORD;


It is not my procedure, it is built-in and it doesn't work.
Re: Replacement for STANDARD TOOLBAR ROW DELETE [message #295365 is a reply to message #295356] Tue, 22 January 2008 03:42 Go to previous messageGo to next message
Littlefoot
Messages: 21823
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Sorry, I thought that there was another procedure.

Saying that "it doesn't work": what exactly happens? Nothing at all? Error message?

Yet another idea: where is that push button? Is it in the same block as a record which is to be removed? If not, how about going to that block first (GO_BLOCK) and then delete it? However, I guess you'd better put this push button into the block (otherwise, you'll have to take care about deleting the right record (instead of the first one, as a result of the GO_BLOCK)).
Re: Replacement for STANDARD TOOLBAR ROW DELETE [message #295375 is a reply to message #295356] Tue, 22 January 2008 04:01 Go to previous messageGo to next message
sasipalarivattom
Messages: 121
Registered: June 2007
Location: Cochin ( INDIA )
Senior Member
Hi Tom,

What I understood is that
1.you have a block with multiple records
2.and there is a button having the code delete_record;
3.Now even you press the button, record it is not deleted.

Now please tell me something more.

1.Only the code delete_record is in the button?
If not, Please show the full coding in the button.

2.Is the button in the same block?
If not, try so.

3.Is forms shows any message while you press the button?
If yes, please tell us what it shows

4.Did you check that it is because of not committing the form?
Try to commit after deleting.

5.Is the record is cleared when you press the button?
If yes, please tell that.


Regards
Sasi...

[Updated on: Tue, 22 January 2008 04:02]

Report message to a moderator

Re: Replacement for STANDARD TOOLBAR ROW DELETE [message #295378 is a reply to message #295365] Tue, 22 January 2008 04:07 Go to previous messageGo to next message
pc131
Messages: 36
Registered: May 2006
Member
HI

Nothing happened which meant, no error message etc but this was due to unknown block you suggested.

When i did:
GO_BLOCK('MY_BLOCK');
DELETE_RECORD;


it deletes record properly now, but only when it is complete (all fields filled in) anyway message pops out (due to WHEN_VALIDATE_ITEM trigger) to fill in all fields.

Anyway when i delete record from standard toolbar, the record may be incomplete an will be deleted....

Tom

[Updated on: Tue, 22 January 2008 04:10]

Report message to a moderator

Re: Replacement for STANDARD TOOLBAR ROW DELETE [message #295390 is a reply to message #295378] Tue, 22 January 2008 04:25 Go to previous messageGo to next message
sasipalarivattom
Messages: 121
Registered: June 2007
Location: Cochin ( INDIA )
Senior Member
Hi Tom,

Your code will delete the first record of "MY_BLOCK"
because go_block will place the cursor in first record.

Now the second thing,
When validate trigger will be fired when you click on the button.
Because the control is passed to another item.

If you dont want to show that message, the only way is to remove that trigger.

regards
Sasi..
Re: Replacement for STANDARD TOOLBAR ROW DELETE [message #295400 is a reply to message #295390] Tue, 22 January 2008 04:45 Go to previous messageGo to next message
pc131
Messages: 36
Registered: May 2006
Member
Hi Sasi

I placed buttono into the same block as block with records but then button appears as many times as many records in block - pity. So I changed "Number Of Items Displayed" to 1 - works now! Same way as button from DEFAULT&SMARTBAR.

Thanks

////////////////////////////////////

One more question do You know how to pass value (varchar2 in my case) to another form while calling it by CALL_FORM???? Any example?

Tom

[Updated on: Tue, 22 January 2008 05:04]

Report message to a moderator

Re: Replacement for STANDARD TOOLBAR ROW DELETE [message #295618 is a reply to message #295400] Tue, 22 January 2008 22:27 Go to previous message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
Please start a new thread for your new question.

David
Previous Topic: Connecting Forms 6i with Sybase DB
Next Topic: Want to dynamically change the file menu of a form
Goto Forum:
  


Current Time: Mon Mar 10 19:07:59 CDT 2025