brugmanrad
17th December 2004, 12:09
Hello all,
I generated a new display session. Now I want some condition built in the program script with which I can prevent display of some records.
So, I want a record only to be displayed if one of the fields to displayed has a certain value.
Which condition can I add in which section?
kbartelds
17th December 2004, 13:59
Hi,
If the field is part of the main table you can use query.extension in before.program. If not, you will have to use skip.io() in main.table.io, but with larger tables this will have a large influence on performance. If you have any more questions, you can sent me a PM or mail directly at info@chitagroup.com.
Klaas
Marc van Kessel
17th December 2004, 14:00
You can use the query extension in the before.program section.
Any where clause is valid.
e.g.
before.program:
query.extension = " tdsls040.cotp = ""AAA"" "
the following is a standard construction I use for linking sessions:
extern domain tcorno zoom.orno
before.program:
if background then
import("zoom.orno", zoom.orno)
query.extension = " tdsls041._index1 = {:zoom.orno} "
endif
form.1:
init.form:
if background then
execute(last.set)
else
execute(get.defaults)
endif
Make sure that any index used in the query.extension is the
same as your session index, for performance reasons.
Regards,
Marc
brugmanrad
18th February 2005, 12:03
Thanks Marc,
the query.extension is working fine.
Ronald