Home » Developer & Programmer » Forms » go_item() fires when-validate-item (Forms 10g, 10.1.2.0.2, SunOS)
go_item() fires when-validate-item [message #530828] Thu, 10 November 2011 22:20 Go to next message
salrizzo
Messages: 7
Registered: December 2009
Junior Member
Hi,

I have migrated a few forms form 6i to 10g with the migration assistant.

In some trigger there is a go_item() that in version 6i DOES NOT cause the WHEN-VALIDATE-ITEM on the current field to fire whereas it DOES fire in Forms 10g.

Example:
Trigger KEY-CREREC:
Code:

go_block('gen_claims');
-- goes to first navigable field in the block, JOB_NO
-- which has a WHEN-VALIDATE-ITEM and is a database field
go_item('gen_claims.new_percent_complete');

In Forms 6i that go_item() does not cause the WHEN-VALIDATE-ITEM to on JOB_NO to fire, but in forms 10g it fires causing a number of unpredictable consequences.

Is there a way to have Forms 10g behave like Forms 6i in that regard? (do not fire When-validate-item when navigation is inside a trigger or a procedure)

Thanks.

Re: go_item() fires when-validate-item [message #530847 is a reply to message #530828] Fri, 11 November 2011 01:34 Go to previous message
Littlefoot
Messages: 21813
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
I wouldn't know (whether it is possible to make 10g behave like 6i).

Why does KEY-CREREC go to a BLOCK first? This:
go_item('gen_claims.new_percent_complete');
is enough; you don't need to navigate to a block first, then to one of its items - simply go to the desired item.

How does that WHEN-VALIDATE-ITEM trigger look like? Do you want to perform validation or not? I suppose that the answer is "yes"; maybe you should fix the code, then? For example: you want to validate the item only if it is not empty, so you'd add
if :gen_claims.job_no is not null then
   <do the validation>
end if;

Or, alternatively, switch to WHEN-VALIDATE-RECORD which is capable of validating items as well, but not at the moment you'd probably want it to.
Previous Topic: update route sequence number if change any one (merged 2)
Next Topic: chnage image in runtime
Goto Forum:
  


Current Time: Wed Jul 10 01:25:13 CDT 2024