Baanboard.com

Go Back   Baanboard.com > Forum > Baan Quick Support: Functional & Technical > Tools Development

User login

Frontpage Sponsor

Main

Poll
For ERP LN feature pack upgrade, what method of install are you using?
Installation Wizard into existing VRC
35%
Installation Wizard into new VRC
42%
Manual into existing VRC
3%
Manual into new VRC
19%
Total votes: 31

Baanboard at LinkedIn


Reference Content

Reply
 
Thread Tools Display Modes
  #1  
Old 13th July 2017, 09:10
Andreas_karl Andreas_karl is offline
Junior Member
 
Join Date: Jul 2006
Posts: 17
Andreas_karl is on a distinguished road
Baan: Baan 4, 5 SSA ERP LN - DB: Oracle - OS: Win XP
Zoom query for assets unplanned
Baan: Other/Unknown
C/S: None/Unknown

Hi,
I made a session where assets can be planned as hired. Therefore I made a new table where a Date from - to is entered in which time period the asset is given away.
My problem is that when a new give away is planned the zoom to session should be filtered to only the assets that are available (check current date first, make a query on the custom table which assets are already taken in that period and then skip these records in the zoom session)
I really have no idea how to do that.
Reply With Quote
  #2  
Old 13th July 2017, 13:39
mark_h's Avatar
mark_h mark_h is offline
Guru
 
Join Date: Sep 2001
Location: Kentucky, USA
Posts: 6,903
mark_h will become famous soon enough
Baan: Baan 4C4 A&D1 - DB: Oracle - OS: Sun Solaris
You could do a query.extension(search this forum for that) on the zoom - so when you zoom to the session you find only the records where the to date is empty. Basically you build a query to limit the records to show what you want for the assets that are still available(or what you need to show on the session).
__________________
Mark

GO Cards!
My latest mantra - make sure you have latest stpapi patches and the latest session object. If on LN then please explore the option of using DAL2 functionality.

Shared Solutions for Baan systems provided free by Baan Board.
Play the Google game and help Baanboard get better rankings. Do your part. Click here to find how.
Reply With Quote
Sponsored Links
  #3  
Old 13th July 2017, 13:50
Andreas_karl Andreas_karl is offline
Junior Member
 
Join Date: Jul 2006
Posts: 17
Andreas_karl is on a distinguished road
Baan: Baan 4, 5 SSA ERP LN - DB: Oracle - OS: Win XP
I know how to use query.extension but it's a little more complicated:
In the custom table are only assets written which are given away so I need to check that table if on a given date that asset is already planned to be given away, save it temporarly and exclude that asset from all assets (tffam100)
But I don't know how to do that
Reply With Quote
  #4  
Old 14th July 2017, 20:27
mark_h's Avatar
mark_h mark_h is offline
Guru
 
Join Date: Sep 2001
Location: Kentucky, USA
Posts: 6,903
mark_h will become famous soon enough
Baan: Baan 4C4 A&D1 - DB: Oracle - OS: Sun Solaris
Assuming this is a display session you can always do something in the main.table.io sections using skip.io if it is in the other table to be given away. I have done something like this in the after.read section on programs - run a quick query to check another table and if a field is set then do skip.io("").
__________________
Mark

GO Cards!
My latest mantra - make sure you have latest stpapi patches and the latest session object. If on LN then please explore the option of using DAL2 functionality.

Shared Solutions for Baan systems provided free by Baan Board.
Play the Google game and help Baanboard get better rankings. Do your part. Click here to find how.
Reply With Quote
  #5  
Old 17th July 2017, 11:02
bhushanchanda's Avatar
bhushanchanda bhushanchanda is offline
Guru
 
Join Date: Sep 2012
Location: India
Posts: 2,286
bhushanchanda has a spectacular aura aboutbhushanchanda has a spectacular aura aboutbhushanchanda has a spectacular aura about
Baan: LN FP 1-9, 10.4, a little bit of Baan IV - DB: SQL Server 2008, Oracle - OS: Windows Server 2008 R2, Unix
Without knowing the table structure and the data stored in the table, it's difficult to pin point the solution. But, as Mark said, you can use query.extension in selection filter to filter the data in the zoomed session. People often write complex queries to do complex filtering. So, again, you may take a second look at the functionality and check if you can use it for your purpose.

I am assuming, you are zooming to session with main table assets(tffam100) and you need to exclude the assets which are disposed/given away on a particular date.

In this case, you might try joining the asset table to the give away table and select assets which are not given away on a particular date. I think, it can be done using selection filter. And, if not, you can try creating another table with a display session of assets. On zooming to this new session, based on the date, you can insert the assets data and it should show you only the required assets.
__________________
Regards,

Bhushan

Unless you try to do something beyond what you have already mastered, you will never grow!
Reply With Quote
  #6  
Old 18th July 2017, 06:07
Andreas_karl Andreas_karl is offline
Junior Member
 
Join Date: Jul 2006
Posts: 17
Andreas_karl is on a distinguished road
Baan: Baan 4, 5 SSA ERP LN - DB: Oracle - OS: Win XP
Thanks all for your replies. I solved it with query.extension.where and made a sub query with "not in"
That excludes all the assets which are already given away.
Thank you!
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Easy SQL pdf Andrea Rossi Tools Development 2 24th March 2017 07:58
zoom on query field in baan query VishalMistry Tools Development 1 4th February 2016 11:56


All times are GMT +2. The time now is 02:22.


©2001-2017 - Baanboard.com - Baanforums.com