Baanboard.com

Go Back   Baanboard.com > Forum > Baan SIGs > Code & Utilities

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 24th July 2009, 13:36
günther günther is offline
Guru
 
Join Date: Jan 2002
Location: Ehingen, Germany
Posts: 570
günther is on a distinguished road
Baan: IVc4 - DB: Informix - OS: HP-UX
CODE: use ttstpcalendar in your programs

Hi,

although the basic parts had already been discussed, I mananged to figure out one more tricky thing: How to pass an argument to that session, so that the calendar starts with a given date instead of the current date.

Then I decided to build a complete sample; the script can be used *as is*, you only have to create a session and a form with two date fields (date.f, date.t); these must have a zoom session "osstpcalendar".

Here is the script:
Code:
declaration:
    #include <bic_process>

    extern domain tcdate date.f, date.t
 
field.date.f:
before.zoom:
    zoom.to.calendar(date.f)
 
field.date.t:
before.zoom:
    zoom.to.calendar(date.t)
 
functions:
 
function zoom.to.calendar(ref domain tcdate date)
{
    long child
 
    | Start the calandar with a given date
    child = activate("ottstpcalendar", str$(date))
 
    | wait until the calendar is done
    wait(child, WTHANG)
 
    | get the return value
    date = g.value
 
    | stop the standard program from zooming (it will hang!)
    attr.zoomcode = 0
    attr.zoomsession$ = ""
}

Last edited by george7a : 4th August 2009 at 12:30. Reason: Fixing the typo..
Reply With Quote
  #2  
Old 24th July 2009, 13:40
günther günther is offline
Guru
 
Join Date: Jan 2002
Location: Ehingen, Germany
Posts: 570
günther is on a distinguished road
Baan: IVc4 - DB: Informix - OS: HP-UX
Oops, the above code contains two errors. It should be zoom.to.calendar(date.f) and zoom.to.calendar(date.t).

Sorry.
Reply With Quote
  #3  
Old 24th July 2009, 18:09
Hitesh Shah's Avatar
Hitesh Shah Hitesh Shah is offline
Guru
 
Join Date: Nov 2001
Location: Mumbai,India
Posts: 1,855
Hitesh Shah is on a distinguished road
Baan: triton,Baan IVc4 , ERP Ln - DB: Oracle/Bisam/SQL 2000/SQL 2005 - OS: Sun Solaris/Windows 2003
Thumbs up Great work

Great Work . Keep sharing such nice code.

Last edited by Hitesh Shah : 4th August 2009 at 17:39. Reason: removing untested not-working suggestion
Reply With Quote
  #4  
Old 4th August 2009, 12:32
george7a's Avatar
george7a george7a is offline
Guru
 
Join Date: May 2004
Location: Nazareth
Posts: 1,490
george7a is on a distinguished road
Baan: IVc, 5.0 b, 5.0 c, LN 6.1 - DB: MS SQL, Oracle - OS: Windows 2000, 2003 & UNIX
Thank you günther for sharing. It is really a nice thing

I have fixed another typo in the function name ;)
__________________
_
George Abdo
NAZDAQ - Your Documents, Your Way.
Reply With Quote
Sponsored Links
  #5  
Old 26th November 2009, 06:02
saumya's Avatar
saumya saumya is offline
Member
 
Join Date: Feb 2008
Posts: 81
saumya is on a distinguished road
Baan: Infor LN, ION - DB: Oracle - OS: unix
good one

Good Job done.
__________________
The world is a tragedy to those who feel,
but a comedy to those who think.
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 Off
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Undocumented Functions & Variables george7a Tools Development 81 30th September 2015 11:35
NEW: vbcode CODE extensions patvdv About Baanboard.com 3 13th March 2003 11:19


All times are GMT +2. The time now is 19:47.


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