peterfarouk
27th July 2003, 15:28
I made a display session and I want to call a function defined in a library each time the user navigate using it by pressing next and previous record.
this is a sample of what i did in the session script
My main table is tiitm001.
=========form section=====
after.form:
field.tiitm001.item:
when.field.changes:
Refresh()
display.all()
but this section is not reached everytime the user navigate
so I should add it some where else but i dont know where???
Can anyone help please
estotz
27th July 2003, 15:45
Display session problem
I made a display session and I want to call a function defined in a library each time the user navigate using it by pressing next and previous record.
this is a sample of what i did in the session script
My main table is tiitm001.
=========form section=====
after.form:
field.tiitm001.item:
when.field.changes:
Refresh()
display.all()
but this section is not reached everytime the user navigate
so I should add it some where else but i dont know where???
Can anyone help please
You are not using the correct events. What you want is:
choice.next.set:
after.choice:
estotz
27th July 2003, 15:48
Sorry .. slippery fingers there.
What you want is:
choice.next.set:
after.choice:
(do whatever)
choic.prev.set:
after.choice:
(do whatever)
If you ware going to update any main table data you will have to update ocurrence etc.
peterfarouk
27th July 2003, 17:02
It didnt work, my choice section is as follow
choice.cont.process:
on.choice:
execute(print.data)
choice.print.data:
on.choice:
if rprt_open() then
read.main.table()
rprt_close()
else
choice.again()
endif
choice.next.set:
after.choice:
Calling My Function.
==================================
when even I debug the script the program flow doesnt come to this lines when I press next button.
so what should I do???
Thankx for your help i appreciate it.
tools123
27th July 2003, 23:25
display session or print session?
estotz
28th July 2003, 01:19
If your form has the next option available it HAS to go to that section. Make sure the form has the option available, and when you go into the debugger, make sure that it is in fact running the code that you intend.
peterfarouk
28th July 2003, 10:32
Thankx alot estotz it is working fine now.
I used choice.next.view instead of choice.next.set.
and yes tools123 it is a display session.