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: 19889
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 message
Littlefoot
Messages: 19889
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.
Previous Topic: document save and retreival in forms
Next Topic: Cursor retrievment problem
Goto Forum:
  


Current Time: Fri Dec 19 21:25:07 CST 2014

Total time taken to generate the page: 0.12808 seconds