Home » Developer & Programmer » Forms » pass value of current cursor location field from one form to another (Form 6i, oracle 10 g, Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - Prod, windows vista)
pass value of current cursor location field from one form to another [message #601010] Thu, 14 November 2013 09:08 Go to next message
hissam78
Messages: 193
Registered: August 2011
Location: PAKISTAN
Senior Member
dear all,
i have two forms emp and dept.

EMP FORM has field
named (flex_value)
with three records
1. susan
2. davis
3. sudhakar

DEPT FORM has field
named (emp_name)

now i need help, if i double click in EMP form of (flex_value) data field e.g.(devis) than
davis need to pass or copy in DEPT form of (emp_name) data field.


thanx


Re: pass value of current cursor location field from one form to another [message #601011 is a reply to message #601010] Thu, 14 November 2013 09:23 Go to previous messageGo to next message
joy_division
Messages: 4963
Registered: February 2005
Location: East Coast USA
Senior Member
Use Global Variables (eg. :GLOBAL.var1).

However, what do you want to do with it in the second form? Your explanation is very vague.
Re: pass value of current cursor location field from one form to another [message #601012 is a reply to message #601011] Thu, 14 November 2013 09:50 Go to previous messageGo to next message
hissam78
Messages: 193
Registered: August 2011
Location: PAKISTAN
Senior Member
thanx for reply dear
my user don't want to enter field value e.g. davis again, in the second form named dept. he requested, once he entered the name davis in emp table. so it should display in second form dept, when he double click on davis in emp table.

as you guide me, i already define the parameter to get the value but i don't understand how to get the field value of cursor location. e.g. if cursor is on davis so on double click davis should pass in dept table. so i am not able to get the cursor position.

can u help me to find the cursor location then i can get specific field data and pass to parameter.

for parameter i have define the following.


In Form EMP (When-mouse-double-click) trigger

DECLARE
List_id ParamList;
BEGIN

SELECT flex_id
INTO :parameter.p_empid
FROM emp

List_id:= GET_PARAMETER_LIST('default');
CALL_Form ('TAX_BOOK_TXB.FMX', hide, NO_replace, no_query_only, 'default');
END;

:parameter.p_empid is also define in dept form in (When-new-form-instance) trigger
but value not passed
Re: pass value of current cursor location field from one form to another [message #601013 is a reply to message #601012] Thu, 14 November 2013 10:30 Go to previous messageGo to next message
hissam78
Messages: 193
Registered: August 2011
Location: PAKISTAN
Senior Member
dear all thanx

problem resolved by using the where condition

DECLARE
List_id ParamList;
BEGIN

SELECT flex_id
INTO :parameter.p_empid
FROM emp

List_id:= GET_PARAMETER_LIST('default');
CALL_Form ('TAX_BOOK_TXB.FMX', hide, NO_replace, no_query_only, 'default');
END;


:dept.emp_name := :parameter.p_empid; in PRE-FORM TRIGGER


regards
Re: pass value of current cursor location field from one form to another [message #601016 is a reply to message #601013] Thu, 14 November 2013 10:40 Go to previous messageGo to next message
cookiemonster
Messages: 13923
Registered: September 2008
Location: Rainy Manchester
Senior Member
Why isn't this:
SELECT flex_id
 INTO :parameter.p_empid
 FROM emp
 WHERE FLEX_ID = :FLEX_ID;

simply this:
:parameter.p_empid := :FLEX_ID;
Re: pass value of current cursor location field from one form to another [message #601018 is a reply to message #601016] Thu, 14 November 2013 11:00 Go to previous message
hissam78
Messages: 193
Registered: August 2011
Location: PAKISTAN
Senior Member
thanx dear cookiemonster,

i agree, you give better solution its working .


regards
Previous Topic: Tracking Remote Desktop access using Oracle
Next Topic: Does mail invoked by using client_ole2 does not work in form run from windows 7?
Goto Forum:
  


Current Time: Sun May 19 08:09:09 CDT 2024