Adding documents to Calendar also creates draft document

Posted on 2006-05-03
Last Modified: 2013-12-18

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?

Question by:RichardStarkey
    LVL 63

    Expert Comment

    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 !
    LVL 18

    Expert Comment

    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


    Author Comment


    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")

    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?
    LVL 18

    Accepted Solution


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

    To not have it show up in the calendar view.

    Author Comment

    Thank you!
    LVL 18

    Expert Comment

    Oops, did I say, "calendar view?"  sheesh, I meant draft view.  Thanks for the points.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Do You Know the 4 Main Threat Actor Types?

    Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

    For Desktop Techs: How to retain a user's Notes configuration data when swapping out the end user's computer. (Assuming that you are not upgrading to a completely different version of Notes client) All you need to do is: 1) install Notes o…
    Notes Document Link used by IBM Notes is a link file which aids in the sharing of links to documents in email and webpages. The posts describe the importance and steps to create a Lotus Notes NDL file in brief.
    Sending a Secure fax is easy with eFax Corporate ( First, Just open a new email message.  In the To field, type your recipient's fax number You can even send a secure international fax — just include t…
    In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

    794 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    16 Experts available now in Live!

    Get 1:1 Help Now