Home » Developer & Programmer » Forms » Enabling all the chec kboxes when block is loaded in forms (Oracle Apps 12.1.3, Oracle Forms 32 bit 10g)
Enabling all the chec kboxes when block is loaded in forms [message #572120] Thu, 06 December 2012 03:59 Go to next message
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 #572123 is a reply to message #572120] Thu, 06 December 2012 04:03 Go to previous messageGo to next message
Littlefoot
Messages: 21103
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
SET_ITEM_PROPERTY you used just enables the checkbox; it doesn't set its value.

What is that block based on? Is it a data block (if so, is the checkbox based on a column)? If its source is a FROM clause, you can select anything you want and set the checbox value that way.

Or, simply loop through all records and set checkbox value to "checked" (1, Y, whatever you use).
Re: Enabling all the chec kboxes when block is loaded in forms [message #572279 is a reply to message #572123] Sun, 09 December 2012 23:55 Go to previous messageGo to next message
Nshan
Messages: 62
Registered: February 2009
Member
Thanks for your reply...
My data block is a database data block... Let me try with your option.
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 Go to previous messageGo to next message
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 #572306 is a reply to message #572294] Mon, 10 December 2012 06:03 Go to previous messageGo to next message
Littlefoot
Messages: 21103
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Thank you for the feedback; I'm glad you solved the problem.

Before posting your next code, please, click here - won't take more than 10 seconds of your time, but will significantly improve readability.
Re: Enabling all the chec kboxes when block is loaded in forms [message #659441 is a reply to message #572306] Tue, 17 January 2017 06:58 Go to previous messageGo to next message
offrine
Messages: 1
Registered: January 2017
Junior Member
Hi Experts,

my requirements is if I select the "select all " label all records are checked and "select null" means all records are unchecked.

code is below


if(event_name = 'SPECIAL31')THEN
if (form_name = 'ARXRWMAI' and block_name = 'APP_FOLDER'
) then
BEGIN
-- GO_BLOCK('APP_FOLDER');
FIRST_RECORD;
LOOP
COPY('Y','APP_FOLDER.CB_SELECT');--:APP_FOLDER.CB_SELECT := 'Y';
EXIT WHEN NAME_IN('SYSTEM.LAST_RECORD')='TRUE'; --:SYSTEM.LAST_RECORD = 'TRUE' ;
NEXT_RECORD;
END LOOP;
FIRST_RECORD;
END;
END IF;
end if;
end event;


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 Go to previous message
Littlefoot
Messages: 21103
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.
Previous Topic: Oracle Forms - Enable Disable Textbox Based On Radio Button Selection
Next Topic: Navigation problem between records in a multi block form
Goto Forum:
  


Current Time: Sat May 27 18:18:21 CDT 2017

Total time taken to generate the page: 0.09096 seconds