NetTalk Central
NetTalk Web Server => Web Server - Ask For Help => Topic started by: cwtart on July 20, 2013, 05:10:23 AM
-
NT7.15
I have a browse/form combo that allows for inserts and deletes. Under some circumstances when a record is deleted it is not really deleted but a flag in the record is set to filter the record out of the browse.
In order to accomplish this I use code in the delete validate embed of the form. This works fine - when the delete button is clicked I set the flag (a byte field that = true or false) in the record - this flag then filters the record from appearing on the browse. But to prevent the actual delete of the record I set loc:invalid = 'something' in the delete validate - the problem is that when loc:invalid is set in delete validate the browse is not reset.
My question is how to reset the browse even though delete validate has prevented the actual deletion of the record.
Thanks,
Chuck
-
ahh - at last, and easy one (at least to answer).
In the ValidateDelete routine set the "ans" variable to the new action.
For example;
mai:Deleted = 1
ans = net:ChangeRecord
Setting ans here effectivly changes the action from "delete" to "change". Note that the actual file field is being set here, not the session value (although doing both is probably a good idea.)
cheers
Bruce
-
Thank you Bruce - that worked
Chuck