I have a calender view that displays Uses a field called Duration. In the duration field there are multiple values eg… (04/05/2001; 04/06/2001;04/07/2001) This works fine and shows each date as a seperate entry for each day… But I created another view off a form that was created by an agent and that same field now shows the entry multiple times on the same day and multiple times on each other day in the field. Why does it work fine off the original form but not off the one created by an agent?
Subject: RE: Problem with Calender view displaying forms created by agent
The reason it doesn’t work is that you’re doing something wrong. It’s perfectly possible to create documents with an agent that display correctly on a calendar.
Without knowing some details about what you’re doing (e.g. the code of your agent), it’s hard to say just what the problem might be. However, I can guess the most likely few.
I’m assuming the new calendar view is basically a copy of the calendar view that works. The difference is probably in the documents that your agent produces, vs. documents produced by editing. Either there are too many of documents created, or the value in the Duration field is different than in your original documents. (Incidentally, “Duration” is a poor name for a field used to store dates.)
“Select” the document in the Calendar view to make sure all the supposed duplicate entries are in fact the same document. If you can make a checkmark by some and not by others, they aren’t the same document.
Use the Document Properties dialog from a view to check the values of your fields. The most likely problem is that you have assigned the Duration field from an array of LotusScript date/time variants, resulting in the inclusion of an unwanted time part (12:00:00 AM) in addition to the date. You should use an array of NotesDateTime object to assign the date, not date/time variants. This by itself is not sufficient to cause entries to appear multiple times on a day, but this difference may be making your column formula freak out. Or, perhaps you have stored text in the fields rather than dates. Notice the datatype displayed along with the field value. Or perhaps you’re missing a computed field. The design of your form is irrelevant. Just because you have defined a field as date on a form, does not mean that documents created by an agent will automatically store a date value there. Likewise, computed fields are not automatically computed when an agent creates a document. The form is only used when editing (or if the agent calls ComputeWithForm). The agent has total control over what values are stored in what fields, including their types.
Subject: RE: Problem with Calender view displaying forms created by agent
I figured out the problem… The agent was pulling from a view that had multiple values treated as seperate entries. So there was multiple dummy forms being created for each document with a duration of more than 1 day.
Thanks for your Help!!!