Home » Developer & Programmer » Forms » Forms Questions
Forms Questions [message #85116] Wed, 02 June 2004 20:09 Go to next message
amit goel
Messages: 20
Registered: March 2004
Junior Member
I want to find out in a record item the location no. of particular field. what is the process to find out?
Re: Forms Questions [message #85120 is a reply to message #85116] Thu, 03 June 2004 00:08 Go to previous message
Himanshu
Messages: 457
Registered: December 2001
Senior Member
Hi,
Please elaborate your question.
Do you want the Postion no of that feild in the Form?

If yes then make use of following code in any of your Form triggers or Procedures:

Declare
L_cur_itm VARCHAR2(80):=NULL;
L_cur_block VARCHAR2(80) := NULL;
L_item VARCHAR2(80):=NULL;
L_Pos Number:=0;
L_Identify_Item Varchar2(80):='XYZ'; -- Name of the item whose Postion we need to check.
Begin

Go_block('ALS_ITEM_CONTROL_TABLE_BLK');


L_cur_block:='ALS_ITEM_CONTROL_TABLE_BLK'; - - -Set Current Block

/**- Go to First item of Current block and loop***/
L_cur_itm := Get_Block_Property( L_cur_block, FIRST_ITEM );


WHILE ( L_cur_itm IS NOT NULL ) LOOP
L_Pos:=L_Pos+1;

L_item:=L_cur_item;

L_cur_itm := L_cur_block||'.'||L_cur_itm;

If L_Cur_Itm=L_cur_block||'.'||L_Identify_Item Then
Message('Postion of '||L_Identify_Item||' In '||L_cur_block||' is '||L_Pos||' .',No_acknoweledge');
Exit;
else
L_cur_itm := Get_Item_Property( L_cur_itm, NEXTITEM );
End If;

/**Keep looping util last item is reached***/
END LOOP;
Exception
When Form_Trigger_Failure Then
Raise Form_Trigger_Failure;
When Others Then
Message(SQLERRM);
End;

Regards
Himanshu
Previous Topic: background colour.
Next Topic: Debuging in Forms6i
Goto Forum:
  


Current Time: Wed May 01 10:11:45 CDT 2024