How to Update on DELETE
Posted 05 September 2005 - 01:38 PM
I'm a newbie in PRO-IV and I'd dearly appreciate any help from you.
This is the situation, I have 2 files, COMPFILE & SMANFILE
A field in COMPFILE is TOTAL_SALESMAN
I am maintaining SMANFILE, how could I deduct from TOTAL_SALESMAN(COMPFILE)
whenever I delete a record from SMANFILE?
How do I use @MODE to capture the current mode of the file? Or maybe screen?
I've tried coding it on Before Write of SMANFILE and call an LU to update my COMPFILE
but it doesn't work...
Wish you could help me on this guys.
Thank you so much and more power!
Posted 05 September 2005 - 03:15 PM
The following should work in both cases :
COMPFILE Change Mode
SMANFILE Delete Mode
On Before Write of SMANFILE
IF @MODE = 'D' THEN
TOTAL_SALESMAN -= [VALUE]
I might also be way off the mark, its been a long day
*Edited to add* You will probably have to refresh TOTAL_SALESMAN if its being displayed on screen
Edited by Neil Hunter, 05 September 2005 - 03:17 PM.
Reply to this topic
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users