VishalMistry
23rd March 2009, 14:11
Hi all,
I have a customized session which contains following fields:
cprj.f - cprj.t (project range)
pdno.f - pdno.t (production order from and to)
what i need is when i have specified project number in project.f, now when i zoom to subsession (display production orders tisfc0501s000) from pdno.f field, it should display production orders of the project specified in cprj.f form field.
can anybody guide, what code is to be written to achive this.
thanks in advance,
vishal
_Ralph_
23rd March 2009, 16:50
You can check the script of the subsession for routines involving zoom from other programs(most part of standard programs have it) In this case you just need to export the variables..
Other alternatives you can find in this forum searching for the following:
query.extend.where.in.zoom()
import()
export()
richylh
23rd March 2009, 21:32
I think you could add the before.zoom in the script to enable the filter of zoomed result. Regarding to your requirements, you could add as follows:
field pdno.t:
before.zoom:
tisfc001.cprj = cprj.f
VishalMistry
24th March 2009, 05:18
Thanks for ur input. But i am calling baan standard subsession, in this case i have no access to program script of this called subsession.
Vishal
VishalMistry
24th March 2009, 05:19
Thanks a lot for the code u have posted. I have written the same code but it has no effect, the subsession is opening with all the records from sfc001.
vishal
amitmmokashi
24th March 2009, 05:52
Hi Vishal,
As pointed out by Ralph, you can use the query.extend.where.in.zoom() in the before.zoom section of pdno.f and pdno.t as follows:
query.extend.where.in.zoom("tisfc001.cprj inrange " &cprj.f " and " &cprj.t)
wiggum
24th March 2009, 14:26
You can't use query.extend.where.in.zoom in BaanIV.
_Ralph_
24th March 2009, 14:46
But I Think that the predefined variable query.extension is allowed. You can set this of before.program section
manish18u
25th March 2009, 07:00
Hi Vishal,
Can you try these.
field pdno.t:
before.zoom:
tisfc001.cprj = cprj.f
export("tisfc001.cprj ",tisfc001.cprj )
Kozure Ohashi
25th March 2009, 17:28
Dear Vishal,
hope to understand your problem in the right way:
Example:
(1) Customized Session -> select an item code
(2) Now i want to zoom to a standardsessiion e.g. tiitm0101s000, it should dipslay the item, selected in the customized session.
|Customized Session:
before.zoom Section:
tiitm001.item = selected.item.from.customized.session |#Set the index fields to the desired value
db.eq(tiitm001) |#Set focus to the desired recordset
Now the focus is on the selected item if you zoom to the standard sub session.
Advantage: You don't have to modify the standard script (by the way, I tried to use export / import in the 2 Scripts, never worked).
Never found a better solution. Maybe others could help.
Regards,
Kozure
wiggum
26th March 2009, 18:08
@Ralph:
Yes, you can use the variable query.extension but you need access to source code of the called subsession to fill it. Vishal hasn't access to it as he said.
Hitesh Shah
26th March 2009, 19:27
try manish's code with tisfc0511s000. Howerver u will not be able to restrict other project recs.
toolswizard
30th March 2009, 19:51
Can you limit by the index? For instance, if I am zooming from Sales Order to Sales Order Lines, I don't want to see lines from other orders. Order is in the index for Sales Order Lines, so I set the minimum Order values, store it, set the maximum values store it and then continue running my session. This should be done in the zoom.from section or begin program if zoomed from.
See http://www.baanboard.com/programmers_manual_baanerp_help_functions_db_operations_store_occ_maxmin