samsan
17th May 2013, 15:34
Hello,
I'm writing a Type 3 session with Main table. I added a query.extension to the script to filter the results.
Now I want to pop a message and close the session if no record is retrieved.
I wrote that code, it works but I think it could be better to use another way.
before.program:
zoom.from.usspe9201s000:
on.entry:
import("w.cous", w.cous)
import("w.codt", w.codt)
import("w.cotm", w.cotm)
query.extension = "usspe900._index2 = {:w.cous, :w.codt, :w.cotm} and usspe900.ddtm > 0 "
main.table.io:
before.read:
select usspe900.*
from usspe900
where usspe900._index2 = {:w.cous, :w.codt, :w.cotm}
and usspe900.ddtm > 0
selectdo
selectempty
message("nothing to treat")
end()
endselect
Thank you in advance for your help.
I'm writing a Type 3 session with Main table. I added a query.extension to the script to filter the results.
Now I want to pop a message and close the session if no record is retrieved.
I wrote that code, it works but I think it could be better to use another way.
before.program:
zoom.from.usspe9201s000:
on.entry:
import("w.cous", w.cous)
import("w.codt", w.codt)
import("w.cotm", w.cotm)
query.extension = "usspe900._index2 = {:w.cous, :w.codt, :w.cotm} and usspe900.ddtm > 0 "
main.table.io:
before.read:
select usspe900.*
from usspe900
where usspe900._index2 = {:w.cous, :w.codt, :w.cotm}
and usspe900.ddtm > 0
selectdo
selectempty
message("nothing to treat")
end()
endselect
Thank you in advance for your help.