Home » Developer & Programmer » Forms » problem in focus cursor using GO_ITEM (forms 6i)
problem in focus cursor using GO_ITEM [message #446403] Mon, 08 March 2010 02:39 Go to next message
allianz2010
Messages: 101
Registered: October 2009
Location: Pakistan
Senior Member

I write code in WHEN-VALIDATE-ITEM trigger

i have 2 fields Total_marks and Obtain_marks
and i am checking that if Obtain_marks is granter that to Total_marks then i show message and null that field and i want that now cursor go again in Obtain marks.
i write this code ..

DECLARE
  ALRT NUMBER;
BEGIN
  IF :O_MARKS > :T_MARKS THEN
    SET_ALERT_PROPERTY('COMMON_ALRT', ALERT_MESSAGE_TEXT, 'Enter wrong number');
    ALRT := SHOW_ALERT('COMMON_ALRT');
    :O_MARKS :=NULL;
   --GO_ITEM('O_MARKS');
  END IF;
END;


GO_item not works here..
Re: problem in focus cursor using GO_ITEM [message #446408 is a reply to message #446403] Mon, 08 March 2010 03:29 Go to previous messageGo to next message
Littlefoot
Messages: 20901
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
I guess that this is the WHEN-VALIDATE-ITEM on OBTAIN_MARKS item. If so, you don't have to "go" to that item (as you already are there) - RAISE FORM_TRIGGER_FAILURE instead.
Re: problem in focus cursor using GO_ITEM [message #446415 is a reply to message #446403] Mon, 08 March 2010 04:09 Go to previous messageGo to next message
gregor
Messages: 86
Registered: March 2010
Location: Germany
Member
Hi,

first. Does your wvi-trigger fire? When and how is the item
populated?

second. "GO_ITEM(..)" function in a When-Validate-Item Trigger
is not allowed because it's a restricted trigger
Re: problem in focus cursor using GO_ITEM [message #446440 is a reply to message #446415] Mon, 08 March 2010 06:21 Go to previous messageGo to next message
allianz2010
Messages: 101
Registered: October 2009
Location: Pakistan
Senior Member

first thanks your reply...

i want to restrict my field...
that obtain_marks not greater then total_marks

than how can i do it..
and in which trigger i write the code..
Re: problem in focus cursor using GO_ITEM [message #446441 is a reply to message #446440] Mon, 08 March 2010 06:49 Go to previous messageGo to next message
Littlefoot
Messages: 20901
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
WHEN-VALIDATE-ITEM on OBTAIN_MARKS item.
IF :o_marks > :t_marks THEN
   MESSAGE('o_marks can not be larger than t_marks');
   RAISE FORM_TRIGGER_FAILURE;
END IF;
Re: problem in focus cursor using GO_ITEM [message #446442 is a reply to message #446440] Mon, 08 March 2010 06:54 Go to previous messageGo to next message
gregor
Messages: 86
Registered: March 2010
Location: Germany
Member
Hi,

my query was:
first. -- Does your wvi-trigger fire? -- Means, do you see the alert ?
-- When and how is the item populated? -- HOW means for example , with a query or per userinput or with your own PL/SQL-programm-code or ....

-- I think , you dont't see your Alert. That means yout WVI-Trigger does not fire. -- Validation occurs if the "Status" of an item is "INVALID". The Status is INVALID if item is populated by userinput.

Re: problem in focus cursor using GO_ITEM [message #446519 is a reply to message #446441] Tue, 09 March 2010 00:41 Go to previous message
allianz2010
Messages: 101
Registered: October 2009
Location: Pakistan
Senior Member

Thanks Little foot

its worked...

IF :o_marks > :t_marks THEN
MESSAGE('o_marks can not be larger than t_marks');
RAISE FORM_TRIGGER_FAILURE;
END IF;

my cursor come again after raised f_t_f ....

thanks again...
Previous Topic: Trigger to check field value after query
Next Topic: Record count
Goto Forum:
  


Current Time: Fri Dec 09 15:09:37 CST 2016

Total time taken to generate the page: 0.17297 seconds