pviaene
asked on
navigation to an item in a when-validate-record trigger
HI,
Does anyone have any suggestions for the following problem:
In my when validate record trigger i'm checking whether a certain item is correct , when it contains an error i want to go to that item , i can't use the go_item proc cause it is an restricted procedure.
Thanks
Peter
Does anyone have any suggestions for the following problem:
In my when validate record trigger i'm checking whether a certain item is correct , when it contains an error i want to go to that item , i can't use the go_item proc cause it is an restricted procedure.
Thanks
Peter
The validation you are carrying out, can it be performed only at a record-level. Can the field validation be carried out at field level? If so, you can carry out the validation on a navigation trigger like key-nxtfld. In the current context, you cannot do navigation. In case, you have no choice to validate at field level, you can set a flag on on-validate record trigger, subsequently using a different procedure in a different trigger, based on the flag you can navigate to the error field.
ASKER
i cant check this in an item trigger, can you give a example how to do this with the procedure?
Thanks
Peter
Thanks
Peter
Yes, that is a problem (not being able to do a go-item in a when-validate-record trigger). The old work-around (from pre-Windows days in Forms2.3 and 3.0) was to have the when-validate-record trigger (or pre-insert/update/delete trigger) put the item name with the error into a Forms global variable, then have the key-next-record trigger or the key-commit trigger check this global, and if not null, do the go-item for the user. These days with Windows-based forms and all of the possible ways to navigate out of a record, many of which do not fire key triggers (scroll bars, mouse clicks, tab pages, etc.) it is more difficult.
I haven't found a good solution for that in Forms6, but then I don't do much in Forms currently, since my current job title is DBA. If your users are willing to use a particular key (like next-record) then you can use the approach I described above.
I'm posting this comment partly to help me too, so if others have a good idea, I'll be notified.
I haven't found a good solution for that in Forms6, but then I don't do much in Forms currently, since my current job title is DBA. If your users are willing to use a particular key (like next-record) then you can use the approach I described above.
I'm posting this comment partly to help me too, so if others have a good idea, I'll be notified.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
great !!!
thankx
Peter
thankx
Peter