• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 256
  • 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?

Thanks.
0
RichardStarkey
Asked:
RichardStarkey
  • 3
  • 2
1 Solution
 
SysExpertCommented:
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 !
0
 
marilyngCommented:
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

Regards!
0
 
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?
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
marilyngCommented:
Richard,

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

To not have it show up in the calendar view.
0
 
RichardStarkeyAuthor Commented:
Thank you!
0
 
marilyngCommented:
Oops, did I say, "calendar view?"  sheesh, I meant draft view.  Thanks for the points.
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

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