• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 542
  • Last Modified:

Goto Calendar View and Date by Field Value


I have a PTO database that has a button to open the basic Calendar view; however, I would like the button to open the calendar and then go to the day off requested. Example, I have a field called StartDate and I would like the button to open up the calendar and go to that date.

So far I have been trying to use the @Command( [CalendarGoTo]), but I can't figure out how to get the value from the StartDate field. Does this need to be done via Lotusscript?

Thanks in advance.
  • 3
1 Solution
ajl7519Author Commented:
This was embarrassingly simple. I just used this. It only highlights the day and it doesn't open it. What code will open the day?

date := StartDate;
@Command( [SwitchView] ; "Calendar" );
@Command( [CalendarGoTo]; date);

Open in new window

What exactly do you mean when you say "open the day"?
Open a document shown in that date or change the calendar view display property to show only selected date (not week or month)?
ajl7519Author Commented:
Yes, open the view so it only shows that day. Right now it displays the month with the day highlighted. I want to see only the day. I was getting errors when the StartDate field was blank so I add an if statement.

date := StartDate;
@If(date="";@Command( [SwitchView] ; "Calendar" );
@Command( [SwitchView] ; "Calendar" ) & @Command( [CalendarGoTo]; date))

Open in new window

Sjef BosmanGroupware ConsultantCommented:
I can't find them in the documentation, but I found this that might help you to modify the view:

@Command([CalendarFormat]; "type")

where type is
1 : One day format
2: Two days
7: One week
14: Two weeks
30: One months

The double quotes are required.
ajl7519Author Commented:
Perfect. I looked all over. This will do the trick.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now