Time to nominate IBM Champions

Kathy Brown recently posted about the nomination of IBM Champions for 2014, and I wanted to spread the word as well. Anyone can nominate non-IBMers who "are sharing their knowledge, evangelize and advocate for IBM Collaboration Solutions (ICS), help grow and nurture the community and provide feedback to IBM (both negative and positive) in a professional manner". You can learn more at the IBM Champion website, and (more important) you can also nominate someone you feel should be an IBM Champion. So what are you waiting for? :-)

0 Comments

Late realization…

Today I logged in to IdeaJam (#thanksbruce) and for some reason I decided to look at my own old ideas, something I haven't done in a while. I noticed this post, from december 2010, almost a year before IBM launced the XWork server in October 2011... Perhaps IBM listens sometimes, even if they did not make it free, $1000/year is not a bad price for a powerful server like Domino/XWorks.

0 Comments

Class for Domino Directory lookups

In many of my Notes programs, I need to perform lookups into the Domino Directory (the database formerly known as Name and Address Book or NAB). So my solution was to create a class that handle those lookups for me, and exposes the most common lookups as separate methods. We have a slightly modified version of names.nsf, with a few added fields. One of them is what we call ParallelID, which is the user's ID in a system called (surprise!) Parallel. Since I perform that lookup all the time, I created a separate method for that one called GetParallelID(). Same with manager lookup for a user, I created GetManagerName() for that. The methods you probably will use the most are GetText() and GetValue(). Since I think this class could come in handy for others, here it is. Enjoy! Option Public Option Declare Class NotesAddressBook Private NABdb As NotesDatabase Private server As String Private nabname As String Public silent As Boolean Public Sub New(servername As String) me.silent = false Call LoadNABdb(servername) End Sub Public Function GetNABdoc(personname As String) As NotesDocument Dim NABview As NotesView If NABdb Is Nothing Then Call LoadNABdb("") End If If Not NABdb Is Nothing Then Set NABview = NABdb.GetView("PeopleByFirstname") Set GetNABdoc = NABview.GetDocumentByKey(ShortUserName(personname)) Else Set GetNABdoc = Nothing End If End Function Public Function database() As NotesDatabase If NABdb Is Nothing Then Call LoadNABdb("") End If If Not NABdb Is Nothing Then Set database = NABdb End If End Function Public Function GetValue(personname As String, fieldname As String) As Variant Dim NABdoc As NotesDocument Set NABdoc = GetNABdoc(personname) If NABdoc Is Nothing Then If me.silent = False then Msgbox "No document found for '" & personname & "' in " & nabname & " on " & server & ".",,"NotesAddressBook::GetNABdoc()" End If GetValue = "" Else GetValue = NABdoc.GetItemValue(fieldname) End If End Function Public Function GetText(personname As String, fieldname As String) As String Dim tmp As Variant tmp = GetValue(personname, fieldname) If IsArray(tmp) Then GetText = CStr(tmp(0)) Else GetText = CStr(tmp) End If End Function Public Function GetName(personname As String, fieldname As String) As NotesName Dim tmpValue As String tmpValue = GetText(personname, fieldname) If tmpValue <> "" Then Set GetName = New NotesName(tmpValue) End If End Function Public Function GetNameByParallelID(parallelid As String) As String Dim view As NotesView Dim doc As NotesDocument Dim tmpValue As String Set view = NABdb.GetView("(LookupUserID)") Set doc = view.GetDocumentByKey(parallelid) If doc Is Nothing Then Exit Function End If tmpValue = doc.GetItemValue("FirstName")(0) & " " If doc.GetItemValue("MiddleInitial")(0)<>"" Then tmpValue = tmpValue & doc.GetItemValue("MiddleInitial")(0) & " " End If tmpValue = tmpValue & doc.GetItemValue("LastName")(0) If tmpValue <> "" Then GetNameByParallelID = tmpValue End If End Function Public Function GetCommonName(personname As String, fieldname As String) As String Dim tmpName As NotesName Set tmpName = GetName(personname, fieldname) If Not tmpName Is Nothing Then GetCommonName = tmpName.Common End If End Function Public Function GetManagerName(personname As String) As String GetManagerName = GetCommonName(personname, "Manager") End Function Public Function GetParallelID(personname As String) As String GetParallelID = GetText(personname, "ParallelID") End Function Public…

1 Comment

Some personal thoughts and a big Thank You

Last week, Volker wrote this excellent article about Tomas Duff (a.k.a. Duffbert). Then yesterday the news reached me about the sudden death of Rob Wunderlich, a long-time member of the Lotus community. I had already started on a post -- in preparation of my upcoming 25 year anniversary of becoming an IT professional -- where I was going to acknowledge a number of people who meant much to me and who were important in making me to what I am today. I have decided to post this text a bit earlier than originally planned. There are so many people who helped me and supported me over the years, and without them I would not be where I am now professionally. Some took a chance on me and gave me jobs where I grew professionally, others were more like mentors or inspirations, and some were teaching me how to do things with computers or in code. I know I am probably forgetting many who deserve to be mentioned. But I want to thank the following: Tonny Olsson - my cousin who worked at Hewlett-Packard and let me see my first computer (complete with a plotter and an acoustic modem he used to connect to HP from our house) in or around 1975. He also introduced me to the world of HP calculators and RPN. Peter Nilsson - my childhood friend and classmate, who introduced me to Basic programming when he got a VIC-20. We spent an evening (right after he got it) entering a program from the handbook, but we did not get it to work that day. Later on we got some programs working. Henry Jacobsson - My teacher in computer science/programming in High School, who allowed me write my code in Turbo Pascal for CP/M-86 instead of the special language COMAL (a mix between BASIC and Pascal). He also taught me the basics of how to plan/design an application. I also want to thank Henry for not kicking me out when I hacked his systems administrator account and assigned myself 1MB of storage on the 30MB hard disk we had on the server. Normally each student got 4kB, but I wanted more. :-) I also want to thank several of the older students in the school's computer club, who helped us younger students when we had questions. I want to mention Hjalmar Brismar, Petter Aaro and Matthias Bolliger, who were always there with advise and knowledge. Arne Josefsberg - head of tech support at Microsoft, he took a chance and gave me a job without me having touched any Microsoft program previously. Rolf Åberg, Magnus Andersson, Anna Söderblom and Micael Dahlquist - also at Microsoft. They helped me learn all kind of new things, from Windows programming using C and the Windows SDK to regular C programming using QuickC, from Excel to Word for DOS. I also ended up wothing with Micael at another job a few years later. Per Engback and Ingvar Gratte - my two main teachers at the systems programming class. Despite this being just a one-year class, I learned plenty, especially C programming and Unix. Krister Hanson-Renaud and Harald Fragner - two programmers/hackers who inspired…

6 Comments

My IBM Notes project on GitHub

I decided to play around a little, and as an experiment put up one of my Notes projects on the open source repository GitHub. You can see the result here: http://github.com/TexasSwede/Class.MailMerge This is a script library in Lotusscript to create documents based on a source document and a template document. I have blogged about it before, but I added some functionality to it, and thought it would be easier for people to download a complete database.  

0 Comments

jQuery – An Overview

Yesterday my boss asked me about a simple overview/tutorial explaining jQuery, Bootstrap and some other web technologies, and how they work together. I decided to also post the result on my blog, so here is the first part. You may recognize some code from a previous blog entry. jQuery is a currently very popular Javascript framework/library. There are other ones, like Dojo (used by IBM in XPages) and YUI (originally developed by Yahoo), but jQuery is right now at the top when it comes to usage. jQuery contains the plumbing behind the scene, it contains functions to let the different elements on the page talk to each other and interact, for example trigger events on click or change. It also have functions to hide and show elements (either directly or fade in or out). One of the big benefits with jQuery is that many functions are much easier to do than in traditional Javascript. It also addresses browser inconsistency, so you don't have to write different code for Firefox and Internet Explorer. jQuery is Javascript, just packaged in a nice library and simplified. There are also UI components and mobile components, found in jQuery UI and jQuery Mobile. Here are a couple of examples, comparing plain Javascript with jQuery: http://blog.jbstrickler.com/2010/06/vanilla-javascript-vs-jquery/. jQuery ties into the DOM (Document Object model) of the browser/webpage in a very easy-to-use way. The way elements are addressed is identical to how you do it in CSS, using . (dot) for classes and # for individual elements. It is not hard to start with jQuery. You do not even have to host the library on your own server, several companies (including Microsoft and Google) host jQuery (as well as other libraries and frameworks) in what is called a CDN (Content Delivery Network). You simply include a line of code in the head section of your HTML, telling the browser to load jQuery from a specified location, and you are all set: <head> <title>Hello, jQuery</title> <script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.1/jquery.min.js"></script> </head> Notice that you don't use http: or https: at the start of the URL. This is a trick that makes it work both on a http or a https site. However, if you have the code locally in the file system on your computer (like many do before uploading the html file to a server), you must add http: at the beginning for it to load. Let take a look at our first jQuery example. Below we have a very simple piece of HTML code: <body>     <button id="btnSave">Save</button>     <div id="messageBox"></div> </body> What we want to do is that when the button is clicked, a message should be displayed in the div with ID messageBox. That is done with the following piece of jQuery: $("#btnSave").click( function() { $("#messageBox").html("You clicked the Save button."); }); What this do is to replace everything inside the div with the text/HTML code we specify. The second line is the code to execute when the event specified triggers/fires. You can put triggers on almost any element, and…

1 Comment

IBM Notes/Domino growing in Asia?

Judging from an unscientific survey of postings in the IBM developerWorks forums, and also in the Lotus/Domino related forums on LinkedIn, the adoption of IBM Notes and Domino seems to have increased dramatically in Asia during the last few years. The growth seems to be mainly in India, with China coming in at number two, while Notes jobs in the US seems to be dropping or being stagnant. The indications that they are new or recent adopters are very strong. Many of the questions are very basic in their scope and it is obvious (and sometimes directly admitted) that a number of the posters are new to the Notes/Domino platform. However, as many of the questions relates to older version of Notes/Domino (mostly 6.x and 7.x ), IBM should have a huge opportunity to Notes/Domino 9.0 on that market. It is slightly confusing why all these new adopters are on such old platform, but there might be some logic reason for that... Also, there is a big interest on LinkedIn for certification, there are frequent requests for the answers to the certifications tests, mostly from people located in Asia. It also seems like IBM is pushing Notes harder in the Asian markets, as I even seen IBM employees in that region asking for the test answers.   Note: I am sure this has absolutely nothing to do with US/European companies outsourcing development to those countries...

3 Comments

Lotus 1-2-3, SmartSuite and Organizer officially retired

Earlier this week, IBM announced the withdrawal of marketing [sic!] of Lotus 1-2-3, together with Lotus SmartSuite and Lotus Organizer, effective 06/11/2013. Support ends on 09/30/2014. I personally never worked with 1-2-3 myself. When I started with computers in school, we used CP/M-86 as the operating system, and had a spreadsheet program developed specifically for use in the Swedish schools. My first job after high school was with Microsoft in 1988, so my first experience with a "real life" spreadsheet program was with Excel 2.0 (as well as with Multiplan for MS-DOS). However, a few years later, in the early to mid 90's, I worked as a journalist and reviewed a new version of Lotus Smartsuite. I remember how impressed I was with the infobox, and how I could have it up on the screen and change properties and see the changes at once, not having to reopen a dialog box over and over again to make a change, like you had to do in the program in Microsoft's Office suite. Of course, we still see that behaviour in the infobox in IBM Notes. Another legacy of the product is the formula language used in IBM Notes, it originated as the macro language in Lotus 1-2-3. Lotus 1-2-3 was a very important part of the early IT history, it was a major part of the PC revolution in the early 1980's. But it was overtaken later the same decade by Excel, since Lotus did not jump on Windows quickly enough, allowing Microsoft to entrenching themselves on that market.

1 Comment

How to set doctype on Notes forms

When redesigning my website to use Bootstrap, I ran into a problem. The navbar (meny) did not render correctly in Internet Explorer 9, despite looking perfect in Firefox and Internet Explorer 10. There are several discussions about this problem on StackOverflow and other forums, and the solution is simply to add <!DOCTYPE HTML> on the first line of the HTML code. However, IBM Domino automatically adds a different doctype string, and there is no database or form property to change/set the correct value. But there is actually a way, and it is not very complicated. Simply create a computed for display field called $$HTMLFrontMatter. Make it hidden from web browsers, and in it you enter a formula that will give you the desired doctype. I simply put "<!DOCTYPE HTML>" in there, and it worked perfectly. Also make sure "Use Javascript when generating pages" is turned off. This way to modify the HTML generated is documented in the online help. It was added in Domino 8.

2 Comments

Export Notes view to Excel – with multi-value fields

A few days ago, a question was asked on StackOverflow about how to export the content of a Notes view to Excel. The caveat was that some columns contained multiple values, but not on all documents. To solve this, I wrote a Lotusscript class that will export view data as either CSV or as an HTML table, both can then be saved to a file and opened in Excel. I am posting the code below. Enjoy!   %REM Agent View Export Created Mar 27, 2013 by Karl-Henry Martinsson Description: Code to export a specified view as CSV. Copyright (c) 2013 by Karl-Henry Martinsson This code is distributed under the terms of the Apache Licence Version 2. See http://www.apache.org/licenses/LICENSE-2.0.txt %END REM Option Public Option Declare Class RowData Public column List As String Public Sub New() End Sub Public Sub SetColumnHeader(view As NotesView) Dim viewcolumn As NotesViewColumn Dim cnt As Integer ForAll vc In view.Columns Set viewcolumn = vc column(CStr(cnt)) = viewcolumn.Title cnt = cnt + 1 End Forall End Sub Public Sub SetColumnValues(values As Variant) Dim cnt As Integer Dim tmp As String ForAll v In values If IsArray(v) Then ForAll c In v tmp = tmp + c + Chr$(13) End ForAll column(CStr(cnt)) = Left$(tmp,Len(tmp)-1) Else column(CStr(cnt)) = v End If cnt = cnt + 1 End ForAll End Sub End Class Class CSVData Private row List As RowData Private rowcnt As Long %REM Function New Description: Open the view and read view data into a list of RowData objects. %END REM Public Sub New(server As String, database As String, viewname As String) Dim db As NotesDatabase Dim view As NotesView Dim col As NotesViewEntryCollection Dim entry As NotesViewEntry Dim colcnt As Integer Set db = New NotesDatabase(server, database) If db Is Nothing Then MsgBox "Could not open " + database + " on " + server,16,"Error" Exit Sub End If Set view = db.GetView(viewname) If view Is Nothing Then MsgBox "Could not access view " + viewname + ".",16,"Error" Exit Sub End If Set col = view.AllEntries() rowcnt = 0 Set entry = col.GetFirstEntry() Set row("Header") = New RowData() Call row("Header").SetColumnHeader(view) Do Until entry Is Nothing rowcnt = rowcnt + 1 Set row(CStr(rowcnt)) = New RowData() Call row(CStr(rowcnt)).SetColumnValues(entry.ColumnValues) Set entry = col.GetNextEntry(entry) Loop End Sub %REM Function CSVArray Description: Returns a string array of CSV data by row %END REM Public Function CSVArray() As Variant Dim rowarray() As String Dim textrow As String Dim cnt As Long ReDim rowarray(rowcnt) As String ForAll r In row textrow = "" ForAll h In r.column textrow = textrow + |"| + Replace(h,Chr$(13),"\n") + |",| End ForAll rowarray(cnt) = Left$(textrow,Len(textrow)-1) cnt = cnt + 1 End ForAll CSVArray = rowarray End Function %REM Function HTMLArray Description: Returns a string array of HTML data by row %END REM Public Function HTMLArray() As Variant Dim rowarray() As String Dim textrow As String Dim cnt As Long ReDim rowarray(rowcnt) As String ForAll r In row textrow = "" ForAll h In r.column textrow = textrow +…

36 Comments

And I am up and running!

Downloaded the Notes client with Domino Designer and Administrator, installed it on top of the public beta from December in a viritual machine (with 1GB memory). Install went without any problems, and the client starts up fine. All settings and bookmarks were preserved from the beta. It just works.

7 Comments

Notes 9.0 available for download

When I woke up this morning, I could finally start downloading the release of IBM Notes and Domino 9.0 Social Edition. And the filenames is actually (mostly) descriptive! Interesting enough, the Notes/Domino Fix List does not show the product released yet: Perhaps someone need to implement a better workflow solution. I know a good product for that. ;-)

3 Comments

Notes 9.0 – MIA

I thought I would download IBM Notes/Domino 9.0 overnight, but after I logged in to Passport Advantage and went to the downloads, I can see that the files have (supposedly) been uploaded, but they are not available to select. If I expand the previous version, all the files for that version shows up... Hopefully IBM have this sorted out in the morning. Scott?

6 Comments

Track your application changes/updates

A while back I created a little tool for my own use, to keep track of my Notes templates and their version numbers. I also developed a tracking database where we track not only changes to Notes applications, but also other changes to our environment. Things like modifications to Domino Directory and Active Directory, as well as other meta data changes, configuration changes, etc. I decided to merge those two applications, and create one focused on tracking changes in Notes templates/applications. I thought perhaps other developers could use this application, so feel free to download the template. This is what the application looks like: After you download the template, use it to create a new Database. In the new database, open the Applications Settings document and enter the application name (should be "Change Tracking"). Also modify the list of systems, this is where the dropdown box in the actual form get its categories from. The only required is one called "System (IBM/Lotus)", but I also suggest to create one called "System (your company name)". You can see an example of the configuration document below. You can now go ahead and load the list of local Notes templates. This is done in the System/Tools section as well. The next step is to open all templates not containing a version field and update them. Go to the section called "No Version"  and open the view, then open each template and select the correct system and enter the application name. Then create the version field using the Template action menu, where you find the action 'Create VersionField'. Enter your initial version number (major, minor, release and build), then save the template document. Now when you have all your templates updated with version numbers, you can start tracking changes using the "Add New Entry" button. Hopefully the application is fairly self-explanatory. The template is using ODS 51, so you need Notes 8.5 or higher to open it. There is also one known issue that I haven't had time to fix yet. If you have the setting "Auto-increase build when adding entry" to "Yes", you have to close and reopen the template document to see the new entry. If it is set to "No", it shows up immediately. If anyone fixes this, let me know and I will update the template on my side too. Update: I have fixed the issue. It was as easy as removing the line  uidoc.EditMode = False  in the 'Add New Entry' action on the 'Template' form. The download has been updated.  Update 2: I have also modified the template to use DateTime fields in a few places where I used regular text fields. Thanks Kenneth for pointing that out!

6 Comments

How to write better code in Domino Designer – Part 3

Welcome to the third part of this series of articles about how to write better code for the Notes/Domino platform. In part 1 I wrote about creating your forms in a way so you get an instant idea of how they work (what is hidden, computed-for-display fields, etc) and in part 2 the subject had moved to Lotusscript, more specifically variable names and comments. As already mentioned in that last article (as well as in some of the comments), breaking out code into functions is a great way to make code easier to read as well as dramatically easier to maintain. That is what I will focus on in this article.   Functions In Lotusscript, the functions are declared the same way as in Visual Basic: Function YourFunctionName(argument As DataType) As ReturnDataType YourFunctionName = ReturnValue End Function You can have any number of arguments, from none to many. However, it is often suggested to keep the number of arguments to a minimum. I try to not use more than three arguments, unless there is no way around it. If you need to send a lot of information into a function, use an array or a custom data type instead. Then it is easier to change the arguments later, without changing the signature of the function. I have occasionally seen that cause issues in nested script libraries. Also, with many arguments the function declaration will probably not fit on your screen, unless you wrap the line. I try to always keep code visible in the editor, as it is easy to miss things when you have to scroll sideways to view code. So let's take a look at one of the code samples in my last article, the one where we call names.nsf to get the email address for the current user. Let's make this a function (like Kenneth Axi suggests in his comment), but we will make it a more generic function, returning the email address for any user present in address book, not just current user. Here is the original code: key = session.CommonUsername Set view = db.GetView("People") Set doc = view.GetDocumentByKey(key) emailaddress = doc.GetItemValue("InternetAddress") Below is how I would write the function. We will talk more about error handling later, but you want to make sure to always check return values before you use them. The function takes one argument, the name of the user we want the email address for, and returns the email address, or blank if no user/address was found. The username must be in the same format as the names are being displayed in the view we doing the lookup in. Function getEmailAddress(username As String) As String Dim personname As NotesName Dim nabdb As NotesDatabase Dim nabview As NotesView Dim persondoc As NotesDocument If username = "" Then MsgBox "Username is empty. Exiting.",,"No Value" Exit Function End If '*** Create NotesName object and get CommonName part. '*** We do this so username argument can be in any format. Set personname = New NotesName(username) '*** Use Domino Directory on main server Set nabdb = New NotesDatabase("Domino1/MyDomain","names.nsf") If nabdb Is…

2 Comments

How to write better code in Domino Designer – Part 2

We already talked about how to make your forms and views easier to maintain. But in most Notes/Domino applications, a majority of the code is written in Lotusscript (at least for traditional applications, XPages are outside the scope of this discussion for now). It is not hard to write easy to read Lotusscript code. Just follow some simple rules. As always, there are more than one way to do things, but this is how I do it (most of the time). I found that this works for me.   Variables Always use Option Declare (or Option Explicit) in all your code. This will prevent you from getting errors later when (not if!) you spell a variable wrong. Option Declare forces you to declare all variables before you use them. It also helps you by warning if a function or method is called with a variable of the wrong data type. Most of your bugs can be avoided using Option Declare. Use it! Give your variables meaningful names. There is no need to abbreviate variables and/or give them cryptical names, or  you will just spell them wrong later. Use a naming system that makes sense to you. As I mentioned in my previous post, I avoid Hungarian notation, it just makes the variables hard to read. Since Lotusscript is a strongly typed language, the compiler is taking care of data types. I however do use some indicators for certain variables. For the few global variables I use, I do prefix them with g_, as I then can give local variables a similar name. By giving your variables meaningful names, the code also becomes largely self-documenting. Be consistent in how you capitalize your variables. I normally write all variables in lower case only, but that is my personal preference. That way they are easy to distinguish from built-in Lotusscript functions and properties of objects. Some programmers prefer some version of CamelCase, which is fine. I occasionally use that, especially in Javascript. Be consistent in how you name related variables. If you have a variable named startpos to indicate the beginning position of a string within another string, name the other variable endpos, not posend. Think through all variables you need so you give them good names. The variables posstart and posend are not as easy to read and understand as startpos and endpos. Of course, using CamelCase, posStart and posEnd are much easier to decypher. Use the same/similar naming convention for the Domino objects as IBM uses in the online help. Use ws, uidoc, session, db, doc, etc. If you need more than one object of any type, e.g. NotesDatabase, name them in a consistent way. I always use thisdb for the database the code is executing in, nabdb for names.nsf, archivedb for (you guessed it!) an archive database, etc. Declare the variables at the beginning of the code/subroutine/function. Don't declare them throughout the code, this makes it much harder to find them later, when you perhaps need to see what data type they are. Declare the variables in…

19 Comments

How to write better code in Domino Designer – Part 1

The inspiration to this series of blog entries partially comes from looking at code posted in the developerWorks forums. Some of it is extremely hard to read and understand, even if you ignore the fact that the forum removes indentation from the code. If you write code that is hard to read, your applications will be hard to maintain. Write the code so it is easy for the poor person who will be maintaining the code in the future. Most probably that person will be you. You might also have to post your code in the developerWorks forum or on StackOverflow for help. If the code is hard to read and understand, you might not get very much help. What I will talk about is what you can do to become a better programmer, and write code easier to maintain. After being a Notes developer since 1996, I have learned a bit about what makes a Notes application easy to read and to maintain. I want to share some of my thoughts on this blog, or in the words of Kevin Spacey at Lotusphere 2011: "sending the elevator down". Hopefully it will help someone. I will not talk to much about basic programming concepts or how to program in Domino Designer. I will assume that the reader already knows that, and is familiar with especially Lotusscript. I will also not talk much about how to create applications with a nice and easy-to-use user interface. That I will save for a later series of articles. Instead I will focus on things that I think will make you a better Notes programmer. I don't take credit for coming up with all the ideas I will talk about, some are from attending sessions at Lotusphere in the past, and some were methods I picked up where I work or worked before. Many of the tips are almost defacto standards among Notes/Domino developers. In this first article, I will start with some tips for when you create forms.   Field Names Use field names that makes sense, and don't use cryptical field names. You may remember right now what kind of data the field is supposed to hold, but in a few months, you have no idea what is stored in it. Some developers use hungarian notation or some similar system with prefixes to indicate what is in a field, but in my experience that makes just for massive confusion later. The only prefixes I use on field names are dsp for any computed-for-display fields and flag for fields that are used to indicate if a document has been processed, is ready to be deleted or to decide if parts of the form should be hidden or not. If you use field names that indicates what kind of data types they contain, be consistent and at least use proper indicators. It is not a good idea to call a field txt_no1 if it contains a number. Anyone that sees that field name will assume it is a text field, and this will cause errors…

18 Comments

Which is faster, ColumnValues() or GetItemValue()?

In a recent discussion thread in one of the forums on IBM developerWorks, the issue of which is faster, doc.GetItemValue() or viewentry.ColumnValues(). I decided to test this, using two Lotusscript agents, created to be as similar as possible, working against the same view of the same database. First, here is Agent #1, using ColumnValues() to get the value we are looking for from the first column of the view. This agent took 66.3 seconds to run, and below you can see exactly how that time was spent:   And this is Agent #2, identical to Agent #1, except two lines, first getting the NotesDocument from the view entry, and then using GetItemValue() to get the value out of the document. This agent took 225.8 seconds to run: In both agents, the call to get the next document in the ViewEntryCollection takes about 60 seconds. As you can see, the 30,000 calls to GetColumnValues() in agent #1 takes pretty much no time -- 1.3 seconds -- while it takes 133 seconds to open the 30,000 documents and read the value of the field from each one in agent #2. Almost exactly 100 times longer! In agent 2, you also have to add 26 seconds to get the NotesDocument object from the ViewEntry object. I hope this settles the discussion.  

3 Comments

Lotusphere/Connect 2013

I have not been blogging here during Lotusphere/Connect 2013. It was a very busy conference, I went to a large number of sessions, and also many social gatherings of different kinds. In addition, I have been blogging at SocialBizUG.org, and if you don't have an account there, go get on. If you already are a member of LotusUserGroup.org, your login credentials from there should work. Below are links to my blog entries at that site. Enjoy! Day 1 - Sunday Day 2 - Opening General Session Day 2 - Monday Day 3 - Tuesday Day 4 - Wednesday Day 5 - Thursday I also want to share the traditional yearly blogger picture on the Lotusphere stage:  

0 Comments

Preparing for Connect 2013

As I posted yesterday, I am able to go to Connect/Lotusphere after all. I now have to rush my preparations. I got a flu shot yesterday duing lunch, and I am about to head out to get my Lotusphere haircut shortly. I also need to pick up another pair of walking shoes and some other items for the trip. This is the first Connect (if you don't count last year, where that was a small conference within the conference), so we are all technically "first timers", but if you haven't been to Lotusphere in the past, I wrote an article for SocialBizUG.org (formerly LotusUserGroup.org) with some useful tips for first time attendees. You can read it here. In just 7 days I will be sitting on a plane heading to MCO. I can't wait.

0 Comments

End of content

No more pages to load