troubleshooting Question

Global variable in form

Avatar of chalie001
chalie001 asked on
DatabasesOracle DatabaseSQLMongoDB
8 Comments3 Solutions152 ViewsLast Modified:
hi how can i reset global variable in oracle form 11g i have the following block IN MY when-new-form-instance


:block_home.enter_employee_id := substr(:global.ent_empid,1,4)||' - '||substr(:global.ent_ent_empid,5,2)||' - '||substr(:global.ent_empid,7,3)||' - '||substr(:global.ent_empid,10,4);	
:BLOCK_HOME.CURR_employee_id    :=substr(:global.uni_empid,1,4)||' - '||substr(:global.uni_empid,1,2)||' - '||substr(:global.uni_empid,3,3)||' - '||substr(:global.uni_empid,6,4);

Declare
	Cursor C_jobs 
	  is
	  Select employee_id, start_date, end_date,
	         job_id, department_id 
	         from hr.job_history
	         where employee_id = substr(:global.uni_empid,5,9); --am geting value as -18-047-6 instead of 5320180476694 how can i resert :BLOCK_HOME.CURR_employee_id
begin
	go_block('job_history');
	-- first clear the block if it contains any records
	clear_block(no_validate);
	-- move control to first record;
	first_record;
	for cur in C_jobs loop
		 :job_history.employee_id := cur.employee_id;
		 :job_history.start_date := cur.start_date;
		 :job_history.end_date := cur.end_date;
		 :job_history.job_id := cur.job_id;
		 :job_history.department_id := cur.department_id;
		 -- move control to next record;
		 next_record;
	end loop;
	-- again after completion move control to first record
	first_record;
	
end;
ASKER CERTIFIED SOLUTION
Mark Geerlings
Database Administrator, retired

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 3 Answers and 8 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 3 Answers and 8 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros