hanibal
18th May 2009, 17:25
Dear friends,

is there is a way to filter data after the session executed ?
for example : when i execute the session first time,its show me item A,
when i execute it second time for item B,,then the session show me item A and B.but i want it to show me the current executed item only.

Please help.

mark_h
19th May 2009, 15:49
You will probably need to provide more details - like what kind of session is it? Display session, maintain session, report session, etc. What are you executing to retrieve the records - maybe a snippet of the code? Maybe the baan 5 experts can help then.

hanibal
20th May 2009, 07:18
i have a maintain session with program script and a form,
once the session execute then i want to set a filter on the display to show only specific items.

mark_h
20th May 2009, 15:40
Can't you use query by forms? Since I am on baan 4 I usually just use a subsession to prompt for a filter, then use the query.extension. Not sure if query.extend.where and other commands are available for Baan 5.

sameer.don
21st May 2009, 08:24
have you tried skip.io("") ?
it can be used for conditional record filtering.

baanspider
18th November 2009, 05:23
Hi everyone

I wish to also set the filter for a display multi-occurence session.
Can anyone post some programming lines on how to do this?

The filter I need is not based on any main table field but on a variable which I put in the multi-occurence field.

I cannot use extend.where, right? What else or methods that I should use?
I am on LN 6

thanks n regards

litrax
18th November 2009, 12:00
Hi,

if you are on ln, you can use the following functions:

query.extend.select()
query.extend.from()
query.extend.where()


An idea of what you want to achieve could be (just a draft!):

field.<view.field.name>:
after.input:
query.extend.where("<yourmaintablefield> = <view.field.value>")
rebuild.query ()


Is that what you want to do?
Please refer to the BaanERP- Programmers manual:
http://www.baanboard.com/programmers_manual_baanerp_help_functions_sql_query_extensions_overview

Hope that helps that you get an idea of how to use the query extensions.
Litrax

NPRao
18th November 2009, 22:12
Use search option on the forum to refer to similar issues which were already discussed -

How can i refresh a session by a variable? (http://www.baanboard.com/baanboard/showthread.php?t=26008&highlight=rebuild.query)

rebuild.query() (http://www.baanboard.com/programmers_manual_baanerp_help_functions_sql_query_extensions_rebuild_query)

How to refresh a display session based on dynamic condition. (http://www.baanboard.com/baanboard/showthread.php?t=22534&highlight=rebuild.query)

excuting before.program() (http://www.baanboard.com/baanboard/showthread.php?t=10017&highlight=rebuild.query)