problem [message #393061] |
Fri, 20 March 2009 03:49 ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
sivajyothi.kalikiri
Messages: 29 Registered: March 2009
|
Junior Member |
|
|
hi,
What's my requirement is i want to enable some records in detail table and some records to disable.
I have a check-box in master block. if i select that only first record in the detail block should get enabled and other records in the detail block should get disabled automatically.
Please help me how to get this.........
|
|
|
|
Re: problem [message #393070 is a reply to message #393065] |
Fri, 20 March 2009 04:14 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
sivajyothi.kalikiri
Messages: 29 Registered: March 2009
|
Junior Member |
|
|
I wrote the following code in WHEN_NEW_RECORD_INSTANCE, but i am getting error
as wrong number of types.
in this property i have to specify record number. BUt my requirement is except first record ,the remaining should get disabled
the code i wrote is
DECLARE
BEGIN
IF :T_CBJ_MST_BLOCK.SERVICE_TAX = 'N' THEN
IF :SYSTEM.CURSOR_RECORD >1 THEN
SET_RECORD_PROPERTY('T_CBJ_DTL',ENABLED,PROPERTY_FALSE);
END IF;
END IF;
END;
tell me sir how can i overcome this problem.
[EDITED by LF: applied [code] tags]
[Updated on: Fri, 20 March 2009 05:28] by Moderator Report message to a moderator
|
|
|
|
Re: problem [message #393088 is a reply to message #393061] |
Fri, 20 March 2009 05:19 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
cookiemonster
Messages: 13963 Registered: September 2008 Location: Rainy Manchester
|
Senior Member |
|
|
YOu can use go_record/next_record etc commands in your button to go to each record in turn and disable it.
|
|
|
|
|
|
Re: problem [message #393122 is a reply to message #393120] |
Fri, 20 March 2009 06:45 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
sivajyothi.kalikiri
Messages: 29 Registered: March 2009
|
Junior Member |
|
|
I tried that one also.
i changed my code like this.
IF :T_CBJ_MST_BLOCK.SERVICE_TAX = 'N' THEN
GO_BLOCK('T_CBJ_DTL');
FIRST_RECORD;
LOOP
NEXT_RECORD;
IF :SYSTEM.CURSOR_RECORD<>1 THEN
set_item_instance_property('T_CBJ_DTL.SL_NO',CURRENT_RECORD,INSERT_ALLOWED,PROPERTY_FALSE);
set_item_instance_property('T_CBJ_DTL.SL_NO',CURRENT_RECORD,UPDATE_ALLOWED,PROPERTY_FALSE);
set_item_instance_property('T_CBJ_DTL.SL_NO',CURRENT_RECORD,VISUAL_ATTRIBUTE,'DISABLE_COLUMN_COLOR');
END IF;
but i am getting an error as no such propery exists........
|
|
|
Re: problem [message #393123 is a reply to message #393061] |
Fri, 20 March 2009 06:53 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
cookiemonster
Messages: 13963 Registered: September 2008 Location: Rainy Manchester
|
Senior Member |
|
|
So debug your code and find out which property it's complaining about - insert message commands between the lines of code see which one is giving the error.
EDIT: I can't spell debug apparently
[Updated on: Fri, 20 March 2009 06:53] Report message to a moderator
|
|
|
Re: problem [message #393237 is a reply to message #393123] |
Fri, 20 March 2009 15:46 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) |
nastyjillu
Messages: 211 Registered: February 2009
|
Senior Member |
|
|
Hi Jyothi,
you have worngly written set_record_property function.
below given is the proper usage.
Set_Record_Property( 3, 'EMP', STATUS, QUERY_STATUS);
in form builder help type set_record_property and see the syntax and usage.
if you have anything not working, dont get tensed. form builder help solves most of the things. only thing is you should know how to make use of it.
think logically about what you really want and what logic you should use . ok??
thanks
raghu
|
|
|