Home » Developer & Programmer » Forms » When_validate_item trigger not working (forms 6i)
When_validate_item trigger not working [message #689895] Sun, 30 June 2024 04:57 Go to next message
mfahimaamirgmailcom
Messages: 64
Registered: May 2011
Location: pakistan
Member
Please find attached my form to this email. I attempted to assign the department name to non-database text_item4 in the when-validate-item trigger, but unfortunately, it was unsuccessful. Below is the code I used in the when-validate-item trigger. I explored all options including override, before, after, and with query, however, none of them yielded any results.

when-validate-item trigger code

begin

select DEPARTMENT_NAME into :employees.text_item4  from  DEPARTMENTS where DEPARTMENT_ID=:employees.DEPARTMENT_ID;

end ;

see my form
  • Attachment: testing.fmb
    (Size: 44.00KB, Downloaded 194 times)
Re: When_validate_item trigger not working [message #689896 is a reply to message #689895] Sun, 30 June 2024 06:35 Go to previous messageGo to next message
shahzad-ul-hasan
Messages: 617
Registered: August 2002
Senior Member
Dear please use
Quote:
begin
Begin
select DEPARTMENT_NAME into :employees.text_item4  from  DEPARTMENTS where DEPARTMENT_ID=:employees.DEPARTMENT_ID;
end ;

In Key_next_item:
Begin
select DEPARTMENT_NAME into :employees.text_item4  from  DEPARTMENTS where DEPARTMENT_ID=:employees.DEPARTMENT_ID;
next_item;
end ;

[Updated on: Sun, 30 June 2024 06:35]

Report message to a moderator

Re: When_validate_item trigger not working [message #689898 is a reply to message #689896] Mon, 01 July 2024 02:26 Go to previous message
Littlefoot
Messages: 21813
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
@fahim, along with the WHEN-VALIDATE-ITEM trigger, create POST-QUERY (using the same code as in the WVI trigger).

@shahzad, KEY-NEXT-ITEM is pretty much useless. It won't even fire if you navigate between items using a mouse. We did use it back in Forms 3.0 (or older), that's true, but that was 20-30 years ago.
Previous Topic: multipl rows into mutiple columns
Next Topic: When_validate_item and When_validate_record Not working
Goto Forum:
  


Current Time: Mon Jul 22 22:13:39 CDT 2024