Good day guys!
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!

How to Update on DELETE
Started by notchpaguia_062208, Sep 05 2005 01:38 PM
4 replies to this topic
#2
Posted 05 September 2005 - 03:15 PM
How are you deleting the records from SMANFILE ? Screen or Update ?
The following should work in both cases :
LS1
COMPFILE Change Mode
LS2
SMANFILE Delete Mode
On Before Write of SMANFILE
IF @MODE = 'D' THEN
TOTAL_SALESMAN -= [VALUE]
ENDIF
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
ie TOTAL_SALESMANTagName.Refresh()
The following should work in both cases :
LS1
COMPFILE Change Mode
LS2
SMANFILE Delete Mode
On Before Write of SMANFILE
IF @MODE = 'D' THEN
TOTAL_SALESMAN -= [VALUE]
ENDIF
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
ie TOTAL_SALESMANTagName.Refresh()
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