Enabling all the chec kboxes when block is loaded in forms [message #572120] |
Thu, 06 December 2012 03:59  |
Nshan
Messages: 62 Registered: February 2009
|
Member |
|
|
Hi All,
My requirement is as below,
I have one main form and there is one button when i click on it, another form should be opened which should display multi records with check box for each record.
I have implemented so far. When the new form is opened by default all the records should be checked.
if user does not want some of them then it can be unchecked(This can done manually)..
I have put below code in when-new-block instance trigger
set_item_property('LOCKBOX_DETAILS.CB_SUBMIT', ENABLED, PROPERTY_TRUE);
It is not helping me. Unable to load the block with all the records checkboxes checked...
Any inputs on this please.
Thanks.
Nshan
|
|
|
|
|
Re: Enabling all the chec kboxes when block is loaded in forms [message #572294 is a reply to message #572279] |
Mon, 10 December 2012 03:52   |
Nshan
Messages: 62 Registered: February 2009
|
Member |
|
|
I have done by looping through all the records as below,
DECLARE
l_total_rec NUMBER;
BEGIN
go_block('XX_FAIL_TRXN');
last_record;
l_total_rec := :system.cursor_record;
first_record;
FOR i IN 1..l_total_rec LOOP
go_record(i);
:XX_FAIL_TRXN.CB_SUC := 'Y';
END LOOP;
first_record;
END;
Thanks,
Nshan
|
|
|
|
|
Re: Enabling all the chec kboxes when block is loaded in forms [message #659444 is a reply to message #659441] |
Tue, 17 January 2017 07:24  |
 |
Littlefoot
Messages: 21823 Registered: June 2005 Location: Croatia, Europe
|
Senior Member Account Moderator |
|
|
It is difficult to read as you didn't format the code (or, even if you did, you should have used the [code] tags; have a look here, it'll tell you how to do it). Also, there's not use in posting commented lines as they are meaningless (at least, here).
Anyway: Nshan, in his last message, posted working code. Try to adjust it so that it works for you as well; shouldn't be too difficult.
|
|
|