Hi Freaks
I need a good idea 🙂
Having a "simple" READ-trigger like this
call SO_READ("")
IF($status<0) RETURN($status)
..do some code ..Where in SO_READ is the "read" statement and "a little bit more"
After the read, there is a security check, if our if not the clerk should see the row.
If not, a simple DISCARD kick the row away
A simple was to handle this kind of requirement.
BUT (Yes Ingo again with BUT)
The DISCARD triggers the READ-trigger again without leaving SO_READ before.
After around 100 DISCARDs : "Runtime error: Proc stack overflow"
One solution would be to return a DoDiscard-Flag and do the DISCARD directly in READ-trigger
But then I have to do so in hundreds of programms, sometime with code after SO_READ.
A simple search and replace is not appropriate.
My first thought was to set a global flag, leave the inner SO_READ, fetch the flag in outer SO_READ and then do the rest of the job.
Now the code after SO_READwill done even if I want to DISCARD.
Any idea is welcome.
Ingo
PS: In this very moment, my grey cells thinking about a solution with $status=-123456789 and fetch this