Home » Developer & Programmer » Forms » setting property
setting property [message #399332] Tue, 21 April 2009 11:42 Go to next message
shahidmahmood2069
Messages: 11
Registered: February 2009
Junior Member
Hi
I have name, add and city columns in tabular form in oracle developer. My query reterive 5 record. Name and add columns are not allowed for updated city is drop down list having six values by default(blank). When i reached last record
and press entered it goes to next record where no name and add exist. i want to stop the cursor not
to go there and stay on last record.

Also i want to set property disable of row where city is say 'NYK'
Re: setting property [message #399335 is a reply to message #399332] Tue, 21 April 2009 12:07 Go to previous messageGo to next message
javed.khan
Messages: 340
Registered: November 2006
Location: Banglore
Senior Member

Use cursor for loop and write a Query to Exclude city Like 'NYK'
for Example

DECLARE
    V_CITY VARCHAR2(10);
    
    CURSOR C1 IS
    SELECT CITY_CODE , CITY_NAME
    FROM CITY WHERE CITY NOT LIKE 'NYK'
BEGIN
:MSG:=' ';    
FOR C1_A IN C1 
LOOP
    GO_BLOCK('BLOCK_NAME');
--    FIRST_RECORD;
    :CITY_CODE:=C1_A.CITY_CODE;
    :CITY_NAME:=C1_A.CITY_NAME;
    EXIT WHEN C1%NOTFOUND;
        NEXT_RECORD;
END LOOP;
END;



You can use if then else for setting Visual attributes.
Re: setting property [message #399371 is a reply to message #399335] Tue, 21 April 2009 19:27 Go to previous messageGo to next message
shahidmahmood2069
Messages: 11
Registered: February 2009
Junior Member
Thanks for your reply. May be I have not expalined my problem well.
I fetch all records in tabular form with three columns and only city column can be updated through
drop down list. When i Press enter key after last record cursor goes to next row where no record exist
only city can be changed. I want to stop cursor not to go after last record. Also if in city 'NYK'
exit no one can change this record.
Re: setting property [message #399385 is a reply to message #399371] Tue, 21 April 2009 22:54 Go to previous messageGo to next message
danish_fsd@yahoo.com
Messages: 38
Registered: February 2008
Location: Pakistan
Member
Hello,

Use KEY-NXTREC trigger at block level and check

IF :System.Last_Record = 'TRUE' THEN 
   NULL;
ELSE
   Next_Record;
END IF;


Regards

Danish
Re: setting property [message #399445 is a reply to message #399385] Wed, 22 April 2009 04:40 Go to previous messageGo to next message
shahidmahmood2069
Messages: 11
Registered: February 2009
Junior Member
How I can disable on row when my form is in tabular form i.e if city = 'NYK' then disable that row.
I used set item instance property at form level and also at post query but it does not work
Re: setting property [message #399446 is a reply to message #399385] Wed, 22 April 2009 04:51 Go to previous messageGo to next message
shahidmahmood2069
Messages: 11
Registered: February 2009
Junior Member
Thanks
How I can disable record if city = 'NYK'
I used set instance property at when new form instance and at post query but it does not work
Re: setting property [message #399590 is a reply to message #399445] Thu, 23 April 2009 01:57 Go to previous messageGo to next message
djmartin
Messages: 10180
Registered: March 2005
Location: Canberra ACT Australia
Senior Member
Account Moderator
Do this work at the record (block) level.

David
Re: setting property [message #399631 is a reply to message #399446] Thu, 23 April 2009 03:44 Go to previous message
danish_fsd@yahoo.com
Messages: 38
Registered: February 2008
Location: Pakistan
Member
As I know, you can't disable a single row in detail block. So, you need to change your logic.

For instance, you may create two blocks and restrict one block to city = 'NYK' in block's where condition property and restrict other block for other city values.

Regards

Danish
Previous Topic: Disable Button
Next Topic: triple stars
Goto Forum:
  


Current Time: Fri Dec 02 22:46:09 CST 2016

Total time taken to generate the page: 0.16316 seconds