Baanboard.com

Baanboard.com (http://www.baanboard.com/baanboard/index.php)
-   Tools Development (http://www.baanboard.com/baanboard/forumdisplay.php?f=8)
-   -   Return Field for Calendar (http://www.baanboard.com/baanboard/showthread.php?t=9778)

baanlegend 25th April 2003 21:39

Return Field for Calendar
 
I am trying to zoom to the calendar(ttstpcalendar) for date fields, but I am not sure what should be return field for passing the value selected from calendar to the Form field.

Could you please let me know if you come across this ?


Thanks

mark_h 25th April 2003 22:16

Not sure I understand
 
I am using Baan 4c3 and in all of my date fields I can zoom to the calendar using f2. Pick a date, click ok, and that date is automatically populated in the form field. I do not doing anything special, other than declaring the field as date. Is this different in Baan5?

Mark

mohan05 26th April 2003 06:48

I think Mark is right. You don't need to do any additional thing. Just press F2 on this field provided that field should be of date type.

-Mohan

ReinhardH 4th May 2004 11:54

You find the return value in g.value.

I give you a small program code:

long year, month, day

if type.of.field() = DB.ENUM then
activate(ottstpcalendar)
repeat
until g.value > 0

num.to.date(g.value, year, month, day)
endif

I hope i can help you :)

g√ľnther 5th May 2004 09:17

avoid active polling!
 
Reinhard, you are using active polling which might be very time consuming for your cpu; and I guess your activate part is not working. Here is a slightly modified version:

Code:


#include <bic_process>

long year, month, day

if type.of.field() = DB.ENUM then
  long child
  child = activate("ttstpcalendar")
 
  wait(child, WTHANG) | instead of "repeat until g.value > 0"

  num.to.date(g.value, year, month, day)
endif


Hitesh Shah 6th May 2004 16:51

why db.enum for date field
 
ReinhardH, U use db.enum for date field .I think u should use instead db.date for zoom .

Gunther, what does function 'wait' does. I don't have that function here. I use pstat function to check the existence of ttstpcalender object with while - endwhile loop. I think that too should be cpu intensive.

NPRao 6th May 2004 19:33

Hitesh,

There is more info in the tools manual -

wait()

Multitasking and the GUI

Synchronizing processes with the wait() function

Hitesh Shah 7th May 2004 15:04

wait
 
There is no help on this in our SP12 installation . However the code does compile . Thanks guys for the help.

juvenile 7th August 2004 10:35

In myprint session I have 2 fileds called fromdate and todate.If I zoom to calendar using f2 some default dates it is returing .I want the dates what ever the user selected what should I do?

The code snippet which is present in this thread where exactly we need to write.

rgds,
juvenile

mark_h 11th August 2004 22:40

Just checked some of my sessions. I have a from date and a to date. When I use f2 on the from date it brings up the calendar session. After selecting the date, I click ok. This date then appears on the from date field. The same holds true for the to date. I have no code in my program and this works. Not sure I understand what you mean be "default dates" being returned.

Mark

VishalMistry 21st October 2016 12:33

Thanks Mark,

Altough I could not do it through code as puting gunther's code, session seems to go into infinite loop. but your trick pressing F2 really helps as it does not require a single line of code. But, is there any way to put some help in the status bar when focus comes iin the field. (like Press F2 to select date).

Thanks again,
Vishal

manish_patel 24th October 2016 09:46

Quote:

Originally Posted by VishalMistry (Post 199704)
Thanks Mark,

Altough I could not do it through code as puting gunther's code, session seems to go into infinite loop. but your trick pressing F2 really helps as it does not require a single line of code. But, is there any way to put some help in the status bar when focus comes iin the field. (like Press F2 to select date).

Thanks again,
Vishal

Use mess() function with separate_window argument 0 in before.input field section and clean.mess() function in after.input field section.


All times are GMT +2. The time now is 09:36.


vB.Sponsors
©2001-2018 - Baanboard.com - Baanforums.com