Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

when -validate-item trigger

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
I have been stuck with this seemingly simple code now for three days. I think it is time for me to cut my losses by seeking your help.
What I want to accomplish is this - if flag is B then
if j is empty or null then give the message
'ENTRY CANNOT BE EMPTY'
and make sure the cursor stays in j box until it is assigned a value. This is like the onFocus in Javascript whereby a cursor will stay on a box until it is assigned a value.
After I tested the code, it is still inserting records without problem and the message is not displaying.
Any help would be greatly appreciated.
tankem

IF( orig:flag='B') THEN
IF:)orig.J IS NULL) THEN
BEGIN
MESSAGE('ENTRY CANNOT BE EMPTY');
:eek:rig.J := CUR_ITM; GET_ITEM_PROPERTY:)SYSTEM.CURSOR_ITEM,NEXTITEM);
END;
ELSE
:eek:rig.L := GET_ITEM_PROPERTY:)SYSTEM.CURSOR_ITEM,NEXTITEM);
END IF;
 
Is this code on a when-validate-item trigger on item ORIG.J?

You will need to raise a FORM_TRIGGER_FAILURE after the message to get the code to stop.

I'm a bit confused by the line

:eek:rig.J := CUR_ITM; GET_ITEM_PROPERTY:)SYSTEM.CURSOR_ITEM,NEXTITEM);

What are you trying to do here?
 
hi lewisp!
It has been resolved!
Thanks for caring anyway.
tankem
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top