Home » Developer & Programmer » Forms » how to work with Check-Box (Forms6i,WinXP)
how to work with Check-Box [message #310268] Mon, 31 March 2008 15:38 Go to next message
adilsami
Messages: 46
Registered: October 2007
Member
Hi,

In a form which have list of record's displayed (tabular),
and every row has a check-box in front of it.
when i press the delete button, ONLY the select rows should
be deleted .

how i can do that ..

Regards,
Adil
Re: how to work with Check-Box [message #310277 is a reply to message #310268] Mon, 31 March 2008 16:41 Go to previous messageGo to next message
Littlefoot
Messages: 20893
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
If checkbox is stored in the database (i.e. it is one of the table columns), simply
DELETE this_table
WHERE some_dcondition
  AND cb_checkbox = 1
(just one of the possibilities)

Otherwise, walk through the block (from its first to the last record) and delete records (CLEAR_RECORD) where checkbox is checked:
IF CHECKBOX_CHECKED ('block_name.checkbox_name') THEN 
   ...

Of course, you can loop through database records as well and use DELETE_RECORD built-in.
Re: how to work with Check-Box [message #310282 is a reply to message #310268] Mon, 31 March 2008 17:50 Go to previous messageGo to next message
adilsami
Messages: 46
Registered: October 2007
Member
hey thanx buddy,
but I've solved it with this :

on the WHEN-BUTTON-PRESSED Trigger :
GO_BLOCK('BLOCK_NAME');
IF :BLOCK_NAME.CHECKBOX_NAME ='Y' 
THEN
DELETE_RECORD;
COMMIT;
END IF;

I've set the check-box properties
value when checked = Y
value when un-checked = N

[Updated on: Mon, 31 March 2008 17:53]

Report message to a moderator

Re: how to work with Check-Box [message #310323 is a reply to message #310268] Mon, 31 March 2008 23:35 Go to previous messageGo to next message
azamkhan
Messages: 548
Registered: August 2005
Senior Member
issue DELETE_RECORD or CLEAR_RECORD
Re: how to work with Check-Box [message #310898 is a reply to message #310323] Wed, 02 April 2008 14:44 Go to previous messageGo to next message
bluerratiq
Messages: 22
Registered: March 2008
Location: Bucharest
Junior Member
issue DELETE_RECORD or CLEAR_RECORD
meaning ?

[Updated on: Wed, 02 April 2008 14:45]

Report message to a moderator

Re: how to work with Check-Box [message #311249 is a reply to message #310898] Thu, 03 April 2008 17:38 Go to previous message
djmartin
Messages: 10180
Registered: March 2005
Location: Canberra ACT Australia
Senior Member
Account Moderator
No idea. Just remember to do an 'execute_query' at the end so that the displayed page is refreshed.

David
Previous Topic: User Priviledges from Developer form 6i
Next Topic: list item - poplist - ctrl pagedown
Goto Forum:
  


Current Time: Mon Dec 05 06:53:02 CST 2016

Total time taken to generate the page: 0.08719 seconds