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

Adding documents to Calendar also creates draft document

Hi Al,
I've a bit of an issue.  When someone has a travel request approved in a database the idea is that they can click a button and it will copy the details over to a calender entry.  There's two problems at the moment.

The first one is that I am creating one document in the Calender for each day of the travel request.  Ideally I want to be able to create one document for all days much like a normal Calender entry.

Secondly, every document I create is getting added to the Calender fine.  However, an entry is also being added to the users draft folder so if someone is away for 14 days they are getting 14 draft documents added to their draft folder as well as their calender.

Any ideas?

  • 3
  • 2
1 Solution
Without seeing the code, I would suggest either deleting the Drafts or trying not to save them in the first place.

You may need to use backend rather than UI code to do this.

I hope this helps !
Hi RichardStarkey,
Here is the selection formula for the DRAFT view.  Make sure the documents you create don't fall into the formula :)
SELECT PostedDate = "" & $MessageType = "" & @IsNotMember("D" : "A"; ExcludeFromView) & ISMAILSTATIONERY != 1 & Form != "Group" & Form != "Person"

add an Excludefromview="D","A"

d=discussion, a=all

RichardStarkeyAuthor Commented:

Basically, the code finds the local mail file and creates a document.  It then sets up a few of the basic document fields.  The following is a section of the code...

Set appt = maildb.CreateDocument
appt.Form = "Appointment"
appt.MeetingType = "1"
appt.AppointmentType = "0"            
appt.OrgConfidential = "0"
Set iconitem = New NotesItem(appt , "_ViewIcon" , 160)
iconitem.IsSummary = True
Call appt.ComputeWithForm(False,False)
Call appt.ReplaceItemValue("$PublicAccess", "1")
Call appt.save(True,False)

There's additional code for setting up the start date and end date.  I looked at the view selection formula of the draft view and couldn't really figure out what additional field (and what additional field value) I would have to add to the above to stop the document appearing in draft as well?
Cloud Class® Course: Microsoft Azure 2017

Azure has a changed a lot since it was originally introduce by adding new services and features. Do you know everything you need to about Azure? This course will teach you about the Azure App Service, monitoring and application insights, DevOps, and Team Services.


appt..ExcludefromView = Evaluate({"A":"D"})

To not have it show up in the calendar view.
RichardStarkeyAuthor Commented:
Thank you!
Oops, did I say, "calendar view?"  sheesh, I meant draft view.  Thanks for the points.
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

Cloud Class® Course: Ruby Fundamentals

This course will introduce you to Ruby, as well as teach you about classes, methods, variables, data structures, loops, enumerable methods, and finishing touches.

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