360 Lotus blogs updated hourly. Who will post next? Home | Downloads | Events | Jobs | Twitter | Bookmarks | Pods | Forum | Blogs | Search | myPL | About 
 
Latest 7 Posts
Oh what a difference an S makes
Thu, Mar 11th 2010 81
New family blog
Thu, Mar 11th 2010 26
My mother helps stop MSDS (Memory Stick Disappearnce Syndrome)
Mon, Mar 8th 2010 92
Is "a" Sandwich a category error and can mayonasie dribble be accurately measured
Sat, Mar 6th 2010 35
Good Music , good company and craic in the nineties @ the Beflast songwriters festival
Fri, Mar 5th 2010 21
If curling were easy it would be called Hockey
Mon, Mar 1st 2010 50
ILUG 10 Preperations gathers pace ... poster ideas
Wed, Feb 24th 2010 111
Top 10
ILUG 10 Preperations gathers pace ... poster ideas
Wed, Feb 24th 2010 111
My mother helps stop MSDS (Memory Stick Disappearnce Syndrome)
Mon, Mar 8th 2010 92
Access the clipboard in Javascript
Sun, Feb 14th 2010 89
Oh what a difference an S makes
Thu, Mar 11th 2010 81
....and while I am at it, Ireland WTF?
Sun, Feb 14th 2010 59
If curling were easy it would be called Hockey
Mon, Mar 1st 2010 50
A new 419 Scam arrived this morning and I just couldnt resist
Fri, Dec 11th 2009 43
Enthusions and Indifferons - The physics of not being arsed
Sun, Feb 14th 2010 40
A Credit Crunch Variation on a 419 Theme
Fri, Oct 24th 2008 37
BBA - Breeding Bananas for Anguilla
Thu, May 28th 2009 35


Notes Client Tip - Dragging and Dropping documents into a calendar
   

I was asked today the following question,
Why can't we drag a customer from a customer list onto our Customer Visit Calendar and make an appointment with them that way?
Good question. We already have that functionality on the web interface. Popup a customer list, select the customer or customers from the list and drag them to the day you want to schedule the visit and it auto creates the document for that customer on the day you dragged the document(s) onto.

I sucked my pencil for a bit, scratched various bits of my anatomy that would not be misconstrued by my colleagues as offensive and hummed and ahhed. I pinged Julian Robichaux and bounced the idea off him. Can I drag docs which are not calendar docs from an embedded view on a page (or form) onto calendar view embedded on the same form and create a document or documents based on the QueryDragDrop event of the calendar based on the documents that I had dropped.

Julian confirmed my initial thoughts that this was a non-runner because when a view is embedded you can't seem to access the drag drop events - BUMMER! So I then mentioned a word not mentioned in polite society much these days and to give Julian credit it didn't finch or berate me in any way. "What about Framesets?" I said

After a bit of futtering about we discovered that yes you could accecss the Drag and Drop events from FrameA to FrameB and Joy of Joys the CurrentView in the UIWorkspace FrameB's QueryDragDrop event was the view from FrameA! _ YIPEE!

I took my leave of Julian with much thanking and promises of beer and proceeded to have a bit of a debug to see what I could do.

I created a wee test NSF with two forms CUSTOMER and CALENT
Followed by a View of just the CUSTOMER forms and a Calendar view of the CALENT forms
A Frameset was created and in the LHS frame I popped CUSTOMER view and in the RHS frame CALENT calendar view.

On the CALENT view's QueryDragDrop I entered some code and had a ferret about in
what was an what was not passed, this is what I found out.

If you grab one doc from the CUSTOMER view and drop it over the calendar, then there are no documents in the UIView.Documents collection, there is a CaretNoteID that links to the dragging document in the UIView.

If you select more than one document from the CUSTOMER view and drag it over the Calendar then the UIView.documents collection contains the documents you selected.
If you actually select (the wee tick in the gutter) one document the UIView.documents will contain that one document, but you cannot count on users doing that.

Sub Querydragdrop(Source As Notesuiview, Continue As Variant)

Dim ThisSession As New NotesSession
Dim ThisDB As notesdatabase
Dim ThisUI As New NotesUIWorkspace
Dim ThisUIV As NotesUIView
Dim ThisDC As notesdocumentcollection
Dim OldDoc As NotesDocument
Dim NewDoc As NotesDocument

Set ThisDB = ThisSession.CurrentDatabase
Set ThisUIV = ThisUI.CurrentView
' *** Test to see if the view I am dragging from is the calendar or the customer list
If ThisUIV.ViewName <> "Calendar" Then
Set ThisDC = ThisUIV.Documents
'*** Well you must have dragged SOMETHING to fire the event so get it from
'*** from the CaretNoteId
If ThisDC.Count = 0 Then
Set OldDoc = ThisDB.getDocumentById(ThisUIV.CaretNoteID)
Set NewDoc = New NotesDocument(ThisDB)
NewDoc.Form = "CalEnt"
NewDoc.Customer = OldDoc.Customer(0)
NewDoc.City = OldDoc.City(0)
NewDoc.Date = Source.CalendarDateTime
NewDoc.Time =Format(Now,"hh:mm")
NewDoc.Status = "Planned"
Call NewDoc.Save(True,False)
Else
Set OldDoc = ThisDC.GetFirstDocument
Do While Not (OldDoc Is Nothing)
Set NewDoc = New NotesDocument(ThisDB)
NewDoc.Form = "CalEnt"
NewDoc.Customer = OldDoc.Customer(0)
NewDoc.City = OldDoc.City(0)
NewDoc.Date = Source.CalendarDateTime
NewDoc.Time =Format(Now,"hh:mm")
NewDoc.Status = "Planned"
Call NewDoc.Save(True,False)
Set OldDoc = ThisDC.GetNextDocument(OldDoc)
Loop
End If
Else
'*** This is the calendar and I am moving docs around inside it
Set ThisDC = ThisUIV.Documents
If ThisDC.Count = 0 Then Exit Sub
Set OldDoc = ThisDC.GetFirstDocument()
Do While Not (OldDoc Is Nothing)
OldDoc.Date = Source.CalendarDateTime
Call OldDoc.Save(True,False)
Set OldDoc = ThisDC.GetNextDocument(OldDoc)
Loop
End If
Call ThisUI.ReloadWindow()

End Sub


This code allows the user to drag a customer (with or without tick selction) or customers from the customer list in the left hand frame onto the calendar and create a calendar entry for that customer on the dropped on date. The user can also safely drag and drop calendar entries around inside the calendar.

Useful and cool. :-)

I have popped the NSF up here so if you are interested in seeing it in action you can have a go.

Enjoy ...

---------------------
http://feedproxy.google.com/~r/dominoyesmaybe/~3/AtoE4Km9cCs/notes-client-tip-dragging-and-dropping.html
Jun 12, 2009
12 hits



Recent Blog Posts
81


Oh what a difference an S makes
Thu, Mar 11th 2010 3:24p   Steve McDonagh
Just comming into my blog and typed this http://doiminoyesmaybe.blogpot.com and ended up a href="http://dominoyesmaybe.blogpot.com/"here/a.. just my luck..I have a german porn star as a doppleganger and a reglious site as a typo link.. hey ho!br / div class="separator" style="clear: both; text-align: center;"a href="http://4.bp.blogspot.com/_Fkx1-w7uSqA/S5lLXnPFfzI/AAAAAAAABAU/eBgneBMjzlc/s1600-h/ohno.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"img border="0" height="124" sr [read] Keywords: blogger
26


New family blog
Thu, Mar 11th 2010 3:24p   Steve McDonagh
Just a heads up.. I have started a new non-techie blog for the McDonagh Clan over at http://slightlydoolally.com br / I will keep up the techie particularly Yellow tinted posts here but all the "noise" i was infamous for will now be over on Slightly Doolally, so I might be able to reclaim a certain level of professionalism here ... no perhaps not.. ;)br / br / Ohh my better half has started blogging as an assiociated Admin on Slightly Doolally, so if you do browse over ... please say hi to us bo [read] Keywords: admin blogger blogging
92


My mother helps stop MSDS (Memory Stick Disappearnce Syndrome)
Mon, Mar 8th 2010 6:25a   Steve McDonagh
We have all been there.. we are in a meeting or are called to a colleagues PC and we feel we really really need to share some file with that user. So out comes the memory stick and into the other PC it goes .. and as soon as the file is copied your prized memory stick just disappears... poof ... gone.br / br / I have a theory that there is a eddy in the space time continium, the memory chips on the memory stick act as a strange attractor and becon the eddy towards the memory stick and once it ge [read] Keywords: ilug blogger office twitter
35


Is "a" Sandwich a category error and can mayonasie dribble be accurately measured
Sat, Mar 6th 2010 11:25a   Steve McDonagh
I was sat in a href="http://www.groundcoffee.net/pages/about.htm"Ground/a Having the usual excellent Chill, chicken, bacon, roast pepper, cheese and onion panini with a white chocolate Moccha no cream (Well i am on a diet) Now it was pointed out to me recently when you buy a panini you are actually doing nothing of the sort! You are noshing down on a PANINO for PANINI is the plural.br / br / Now it occured to me that a Ground Panino is a foot long and to fit on the plate the very nice baristas c [read] Keywords: blogger mac
21


Good Music , good company and craic in the nineties @ the Beflast songwriters festival
Fri, Mar 5th 2010 9:24p   Steve McDonagh
Having spend the last 10 weeks in the purgatory that is the post Christmas anticlimax I decided that a bit of fun was in order. So I booked SWMBO and myself into the a href="http://www.dukesatqueens.com/"Dukes Hotel/a in Belfast for the weekend of the a href="http://www.belfastnashville.com/"6th Annual Guinness Belfast Nashville Songwriters Festival/a now that might sound a little bit too country and western for my taste and yes there was some Camp;W but we managed to avoid it :-)br / br / I hav [read] Keywords: blogger community email ipod myspace wiki
50


If curling were easy it would be called Hockey
Mon, Mar 1st 2010 6:24p   Steve McDonagh
span class="goog-spellcheck-word"T'other/span span class="goog-spellcheck-word"nite/span I was chatting to span class="goog-spellcheck-word"Duffbert/span about the fine art of Curlingbr / Whichnbsp; rests vampire like in the popular consciousness for 4 years andbr / then explodes on the moonbeam of publicity that the winter Olympics brings.br / br / All of a sudden the media is full of "houses", "Skips" "Stones" and "Ends"br / However as my chat with the bold Mr span class="goog-spellcheck-word" [read] Keywords: blogger mac
111


ILUG 10 Preperations gathers pace ... poster ideas
Wed, Feb 24th 2010 6:23p   Steve McDonagh
The throb of antipication has moved from barely noticable into "shit itis only 9 months away" mode. 9 month's eh? I have time to get pregnant and give birth before the crowds of the faithful descend on Ireland for another round of ILUGy excitment.br / br / Here are a few posters ideas that may or may not be usedbr / br / div class="separator" style="clear: both; text-align: center;"/divdiv class="separator" style="clear: both; text-align: center;"/divdiv class="separator" style="clear: both; tex [read] Keywords: ilug blogger




89


Access the clipboard in Javascript
Sun, Feb 14th 2010 9:24a   Steve McDonagh
Now here is a wee something I fell over the other day whislt trying to figure out a way of copy and pasting a text stream from a Turdcopy; document to a text area on a form. It would be really useful to grab the clipboard contents .. do some RegExp replaces on it and then import it into the text area.br / br / Well after a moment or two's research you can be done in IE and you have to tweak Moz browsers a href="http://www.mozilla.org/editor/midasdemo/securityprefs.html"see here/a to allow it to [read] Keywords: blogger javascript
59


....and while I am at it, Ireland WTF?
Sun, Feb 14th 2010 8:23a   Steve McDonagh
... ohh and while I am at the keyboard and logged on to the blog ...What the hell were Ireland thinking yesterday? Jeeze I mean to say what is the point of me getting all prepared with loads of beer and crisps and the other accoutrements of 6 Nations watcherdom and then you sent the under 13's instead of the real international team?br / br / Go home dig out the SKY+ box and watch the Wales vs Scotland game, now THAT was rugby at it's best!div class="blogger-post-footer"img width='1' height='1' s [read] Keywords: blogger
40


Enthusions and Indifferons - The physics of not being arsed
Sun, Feb 14th 2010 8:23a   Steve McDonagh
It has been a while since I last sat at the keyboard to write a blog post of any kind and to be honest I think I reached the rubicon between "arsed" / "can't be arsed" and Julius Caesar like I marched resolutely in the territory "can't be arsed". Mind you instead of declaiming "ālea iacta est" (The die is cast) or something equally as memorable I think I may have sighed deeply and poured another cup of coffee.br / br / There comes a time in every diariest's life where you start to slip into the [read] Keywords: domino blogger blogging office outlook




Created and Maintained by Yancy Lent - About - Blog Submission - Suggestions - Change Log - Blog Widget - Advertising - FAQ - Mobile Edition