Setting a Date upon Startup
Setting a Date upon Startup
What is the best way to set dates upon startup? I have a web app where the user can select beginning and ending dates for search criteria. I want to set these when the web page loads up so they don't have to. How can I do this easily?
Re: Setting a Date upon Startup
There are typically two entry points you can hook into.
1. is the CreateInstance Event
2. is the Initialized Event
http://docs.lansa.com/14/en/lansa016/pr ... stance.htm
http://docs.lansa.com/14/en/lansa016/pr ... ialize.htm
The general recommended advice is to use the CreateInstance event.
EDIT
To set the actual dates, if your Field is a date type you can use something like
#StartDate := #STD_DATEX.Now
Once you have a date, there are all kinds of methods to manipulate it in the Date Intrinsics.
http://docs.lansa.com/14/en/lansa016/pr ... insics.htm
Hope this helps,
Joe
1. is the CreateInstance Event
2. is the Initialized Event
http://docs.lansa.com/14/en/lansa016/pr ... stance.htm
http://docs.lansa.com/14/en/lansa016/pr ... ialize.htm
The general recommended advice is to use the CreateInstance event.
EDIT
To set the actual dates, if your Field is a date type you can use something like
#StartDate := #STD_DATEX.Now
Once you have a date, there are all kinds of methods to manipulate it in the Date Intrinsics.
http://docs.lansa.com/14/en/lansa016/pr ... insics.htm
Hope this helps,
Joe
Re: Setting a Date upon Startup
Thanks Joe! I will give that a try.
Re: Setting a Date upon Startup
This solution worked as expected and is giving me the dates as I want. Thanks again!