Tuesday, October 9, 2007

Why Computers Frustrate Me

Late last week, my mouse stopped working properly. It is a two-button USB mouse with a scroll wheel. The left button began acting like the right button and the right button did nothing. VERY frustrating. I rebooted, uninstalled and reinstalled the driver, changed the USB port it was connected to, tried a different USB mouse - no change. Gateway technical support was friendly but not very helpful: "everything looks the way it should; I suggest you restore your system to its default state." In other words, spend a day reinstalling everything and lose software from Giveaway of the Day because it can't be reinstalled. Not a good option.

I got a PS/2 mouse and (after rebooting AGAIN) got it to work. But that was a two-button rollerball mouse and I didn't want to make that my permanent mouse.

I tried a few other things I found on the Internet, but since my original mouse was the basic kind that Windows is supposed to handle, nothing I did made any difference (it wasn't like I could reinstall driver software to fix it).

Since the PS/2 mouse worked, I was hopeful a new, different type of mouse might do the trick. I went out and bought a wireless optical mouse, hooked it up and IT WORKS! One less wire to be hooking with my feet under the desk and everything works the way it should now. The $40 I spent on it was well worth avoiding all the reinstall hassles. But I sure wish there was a way to fix problems like this without having to start over from scratch.

Thursday, August 9, 2007

SnTT: Sametime 7.5.1 - Dual Repositories for User Information

A new feature in Sametime 7.5.1 allows you to pull user information displayed on the Sametime business card from two different sources (see this fix list item). So you can get the user's name and location from, say, a Domino Directory and their job title and photo from another Domino database. We had that exact need so this was a nice feature add for us. Another positive is that this lets you include a photo on the business card without requiring changes to your Domino Directory. Note that this also works if one of your data sources is an LDAP directory; I am not discussing that because we don't have that need but the instructions are documented and are pretty similar.

The instructions in the Sametime Information Center for configuring dual Domino repositories are a little confusing in spots (why talk about Sametime using LDAP for authentication when the topic is using the Domino Directory and a custom database?) but they do work. The instructions do not include a detail tag for a photo but it looks like this: <Detail Id="Photo" FieldName="Photo" Type="image/jpeg" />. If you use GIFs instead of JPEGs, set the type to "image/gif". And the value of the FieldName item needs to be the name of the field containing your photo.

One caveat: make sure you type the XML exactly as shown in the example. We spent way too long troubleshooting problems only to find we had two typos. Whatever the reason, the items in the XML tags must be entered exactly as they appear in the example. We had entered one item name as "DBName" instead of "DbName" and another as "Fieldname" instead of "FieldName". As you might imagine, these were a little hard to pick out after staring at the file for a while. Once we corrected the errors, the data and photo from the second database was included in the Sametime business card.

As far as we can tell, this does NOT require 7.5.1 CF1 to work, although we are running CF1 on the box where this is enabled. And it does work if the secondary database is in a folder accessed via directory link. Thanks go to Grant Bingham for the setup instructions for 7.5 (some of which may be made obsolete by this new function) and to Mikkel Heisterberg for the reverse engineering of the userInfo servlet calls, both of which were helpful as we worked our way through this setup.

Ultimately, since the instructions published by Lotus do work, I guess this just serves as a warning to anyone who attempts this to be very careful in your typing.

Technorati:

Tuesday, August 7, 2007

Miscellany

Tonight is golf night. Hopefully it goes better than last week when I played reasonably well - on 7 holes. Two in a row out of bounds and hitting lots of trees don't do anything positive to the score.

Last week I registered at Facebook and found a group of Notes/Domino Geeks. We'll see if anything comes out of that. Facebook is kind of fun overall though.

I bought a new set of speakers for my home computer. The old ones were about 7 years old (Boston Acoustics) and were beginning to have issues with dropping out. I had to jiggle the cables to get sound out of one side. I bought a set of Bose Companion 3 speakers (apparently Series I since BestBuy is selling Series II) and so far I LOVE THEM! I have to get the bass part adjusted properly because they boom too much on songs with "dance beats" and lose the bass line. Worth the money in my mind.

Tuesday, July 31, 2007

Top 5 Side 1 Track 1

OK, no one's tagged me on this but I'm going to jump in anyway. I'm splitting the difference on "mainstream" stuff and "obscure" stuff, in case anyone wonders.

Journey "Frontiers": Separate Ways (Worlds Apart) - I am a HUGE Steve Perry fan and I always say this is my favorite Journey song. The best thing for me is how Jonathan Cain described it in the Time3 box set: "We played it live and the audience came unglued."

Beatles "Abbey Road": Come Together - Gotta have some Beatles on it and this proved they could still make great music in the midst of personal turmoil.

Michael Hedges "Live on the Double Planet": All Along the Watchtower - OK, so this is a live album and not a song that he wrote, but I'm bending "the rules". All that sound is one man, one guitar. A great guitarist who died way too young.

Sass Jordan "Racine": Make You a Believer - Great female blues rock. She's not very big but rocks hard. I saw her once in concert from the front row.

David Broza "Stone Doors": Night in Wyoming - Another acoustic guitarist who I heard for the first time when he opened for Steve Perry. He does recording in English, Spanish and Hebrew and all of those influences are in his music as well. Interestingly, he takes poetry written by others and puts it to music.

Tag:
Devin Olson (I know Phil already did, but Devin hasn't posted)
Ray Bilyk (I gotta have more cowbell!)
jonvon
Mike Sobczak

Technorati:

Friday, June 15, 2007

SnTT: Open the Database Containing a Doc Link

This probably belongs on Alan Lepofsky's site - and maybe it's already there - but I thought it was pretty handy when I figured it out.

I've had lots of occasions where I get a doc link, open the linked document and then want to open the database to see other related documents. I had always gone to my workspace, located the icon for the database I just opened and clicked it to open the database. I figured there had to be an easier way and I finally found it:

Click View | Go up to Parent View.

This opens the view that contains the linked document. Action buttons can execute @Command([GoUpLevel]) to achieve the same effect.

This is probably not news to a lot of people but I just learned about it. Now, if only you could right click on the open document and see the option there...

Technorati:

Friday, June 1, 2007

SnTT: Update to Single-View User Interface

I know it's Friday but this was so cool I just couldn't wait until next week.

About a month ago I posted this in which I explained how I got around some limitations with embedded views that are displayed in framesets. It is, admittedly, not the most elegant solution because it requires the user to click a button to update the embedded view. It also requires some inter-frame communication, for which I used an environment variable. I had thought about using JavaScript (and actually saw another post that might have been useful for that) but didn't get a chance to do anything about it.

But that was before Slawek Rogulski posted to say he knew how to make this work using a single frame and form. Read the comments on the first post and you'll see I was a little skeptical. Well, I got it to work. And it's really pretty simple.

1. In your form that contains the embedded view, set it so it has a Form Header with a height of Fit to Content. You may also want to set a border of 1 pixel to ensure that everything you want in the header is actually there (you can turn that off once you get the header content correct).

2. Select everything on the form that is above the embedded view and cut it.

3. Move the cursor to the top of the form and paste the cut content back in. That should place it in the header area.

4. Save the form.

Now you can just compose a document with that form or place it in the top frame of a two-frame frameset (if you want the bottom frame to be a preview frame). The scroll bars on the embedded view will appear when necessary and will display both the scroll up and scroll down buttons. Plus, there is no need for inter-frame communication or for the user to click a button after selecting field values - once you select a value in the "trigger" field, the embedded view can be updated automatically.

Apparently the rendering engine can account for the height of a form header when displaying the embedded view. If you don't use a header, it does not know the height of form content above the embedded view; as a result, the scroll bar is not rendered correctly (documents in the view can exist below the bottom edge of the application window and there is no way to see the view entries, although you can press PAGE DOWN to move the highlight to them and press ENTER to open the documents).

Thanks a lot, Slawek. This provides a great solution for simple interfaces and is a lot easier than what I initially came up with. He also said he's used this in cases where the embedded view is computed (I didn't need that capability). And it's another great example of the "power of community".

Technorati:

Thursday, May 31, 2007

It's been a week....

since both my Wings teams lost. The K-Wings lost 3-1 in game 7. They played tough but just couldn't get a win on the road in the finals. They still had a good season and the countdown has begun to the start of the next season. The worst part is that the IceHogs announced earlier in the year that they were leaving the league. It bugs me that a team that bolted wins the championship on their way out the door, but they played well enough to win so I have to give them that.

The Red Wings lost in 6. I think the Ducks basically just wore them down with the physical play. It didn't help losing Schneider but there were times when they didn't seem to have the intensity they needed. Interesting talk about the possibility of them going after Giguere this off-season. Guess if you can't beat him, get him to join you. He has looked pretty solid so far, but I still think I'd prefer to see Ottawa win it.

Add to these the funk the Tigers have been in the last week and the uphill battle the Pistons are fighting and it's kind of a tough time for Detroit sports lovers.

Tuesday, May 22, 2007

Do or Die Tuesday

Both the K-Wings and Red Wings are down 3-2 in their series, and both play game 6 tonight. The K-Wings are at home and, according to coach Reeds "always play their best when their backs are against the wall." Here's hoping that's true once again tonight. As for the Red Wings, hope the bitter taste from Sunday lingers long enough to give them motivation.

Both teams just need to play to win rather than playing not to lose. Easier said than done, I know.

I know I'm biased, but I'm not sure an Anaheim-Ottawa series is what the NHL is hoping for from a TV ratings standpoint. Not to mention the fact that there will be more late night games that way. I'm just hoping I can find Versus at the hotel or a bar tonight in Cleveland!

Thursday, May 3, 2007

Wings Win! (Twice)

Both the K-Wings and Red Wings won last night! The K-Wings play at home again on Friday and the Red Wings are home on Saturday. Keep the momentum going!

SnTT: Single-View User Interface Problems (and Solutions)

Lately, I've been doing a lot of user interface work. I've updated the interfaces on three of our applications and created a new interface for the Team Room (7) template. I also used a completely different (for us) style on a new database I developed, which is what I want to share today.

This is a database for which we wanted to keep the interface simple. The primary users are more focused on mainframe programming and don't use a lot of Notes applications, so rather than giving them a list of views to choose from and hundreds of documents to wade through, I embedded a view on a form (called, very creatively, User Interface) and let them choose the category they want to see using a radio button and drop down list on the form. When it is opened, the database creates a document using the UI form and displays the category for the user who opened the database (as in "My Documents"). The embedded view is set to Fit to Window for both height and width.

The original idea was to display the UI form in the top frame of a two-frame frameset. The bottom frame, collapsed by default, would be for previewing documents in the embedded view.

All seemed to be going well until I ran into a category that had too many entries to fit on one screen. In that case, I could see a scroll bar at the right of the view but the last two documents could not be seen. After a while, I discovered that was because Notes does not include the height of text above the embedded view when it calculates the height of the embedded view to fit it to the window. In other words, my embedded view extended below the bottom of the screen by the amount of space I had above it on the form.

Because this was my interface (not an individual document), I didn't want a scroll bar at the right side at all times. I didn't want the user to have to scroll both the interface form and the embedded view, and I didn't want the top part of the form to scroll off the screen so I could see the bottom of the view. So, what to do? I had a couple of ideas that involved tables but I couldn't get the table row height to automatically go to the window height. Setting the height of the embedded view also didn't work because it didn't scroll correctly if the preview pane opened up big enough to hide part of the view. I also thought of a little more traditional two-pane setup but liked the basic idea I had better. "A-HA!," I thought, "I'll create a frameset with three frames." The "A-HA" was easier than the implementation ended up being.

The top frame contains a form with the radio button and drop down list in it, the middle frame contains the embedded view, and the bottom frame is the preview frame. Here is the frameset in Designer:


Because the embedded view is the only thing on the form in the middle frame, setting its height to Fit to Window does not present any scrolling problems; the scroll bar appears when it is needed due to the number of documents in view or when the preview pane is open. The problem is communicating changes in the fields in the top frame to the view in the middle frame so that the view displays the proper category. I decided to use an environment variable for that communication, setting it in the top frame and reading it in the middle frame. I was going to use the OnChange event of the drop down field to trigger the update but @formulas can't be used there. I also found that a) I couldn't set the variable using @formulas and b) I couldn't update the middle frame using LotusScript. GRRRR! I still don't know why neither @Environment nor @SetEnvironment worked. Maybe I needed to restart my client or something.

At any rate, I ended up adding a button next to the drop down with two @formulas: one that runs a small LotusScript agent to set the environment variable and one that refreshes the frame containing the view. I also put an @Environment command in the QueryOpen of the form in the top frame (it worked there!) to set the default value of the variable. After all that work, it looks the way I wanted it and scrolls properly:


I don't love the 'Go' button I had to add but I couldn't come up with another way to trigger the updates I needed to refresh the embedded view. I thought later about using JavaScript to update the view frame and refresh it but I don't know JavaScript very well and couldn't find a good example for what I wanted to do. Maybe I'll revisit it later.

But in the meantime, maybe this is something you can add to your own toolset as you think about your application interfaces.

Technorati:

Wednesday, May 2, 2007

Baseball....and hockey

The Little League season is off to a good start. Because we have only 5 teams in our division, one team gets a bye each night. But on opening day, our team played a double header of shortened games - and won both of them! I was out of town for the weekend but got the full report. Lots of walks and passed balls as you'd suspect but some good hitting and good plays too. Can't wait until Friday to actually see them play.

As for hockey, the K-Wings are in the second round after winning the first series in 6 and are tied at 1 game each heading into tonight's game at home. Two very evenly matched teams but the Wings will win if they play the fill 60 minutes. The Red Wings seem to have their hands full too. I don't want to be too pessimistic, but I think they have to win tonight to have a realistic shot at taking the series.

As Badger Bob used to say, "It's a great day for hockey!"

Thursday, April 12, 2007

Baseball?

I'm helping coach our son's Little League baseball team again this year. He is in his first year in Little Majors (kids pitching) and we had our first practice on Tuesday. It's too early to tell how things are going to go, other than that we only have one kid who has played Little Majors before.

But the weird thing, and the reason for the title of this, is that it was 48 degrees on Tuesday night and we practiced on a clear field. Wednesday, we got 5 inches of snow! Today it is a little warmer and rainy, and it is supposed to be near 50 tomorrow, but it isn't clear if we'll be able to practice tomorrow night.

Hope this weather straightens out soon. It's time for winter to be done!

SnTT: Toolbar Icon to Change Font Colors

This is a quick and dirty tip inspired by a request from a co-worker the other day. He wanted to know if there was a way to quickly change font colors in Notes, similar to the buttons available in Microsoft applications. I said I wasn't aware of one and couldn't locate one after some searching. So, since he's a good guy, and I like to keep people happy with Notes, I decided to write something quickly.

This is the code:
colorchoices:="Black":"Gray":"Red":"DarkRed":"Green":"DarkGreen":"Blue":"DarkBlue":
"Magenta":"DarkMagenta":"Yellow":"Brown":"Cyan":"DarkCyan":"White";
colorcodes:=[Black]:[Gray]:[Red]:[DarkRed]:[Green]:[DarkGreen]:[Blue]:[DarkBlue]:[Magenta]:[DarkMagenta]:[Yellow]:[Brown]:[Cyan]:[DarkCyan]:[White];
newcolor:=@Prompt([OkCancelList];"Choose a Color";"Choose the color to apply to the text: ";"Black";colorchoices);
@If(newcolor="[]";@Return("");
@Command([TextSetFontColor];@Subset(@Subset(colorcodes;@Member(newcolor;colorchoices));-1)))

I set the button caption to 'Change Font Color' and popup help to 'Change the font color' and chose the toolbar_paintblu.gif icon from the list of available icons.

Note that I said this was "quick and dirty". The code could probably be more efficient but it is functional. Note also that this button will work to set a font color at the insertion point or to change the color of selected text.

Enjoy!

Technorati:

Wednesday, January 31, 2007

Lotusphere 2007 Wrap-Up

This was my second Lotusphere and I felt a lot more comfortable all week. For one, I knew the physical spaces and had a better idea going in of where I was going and how much walking I would actually do. For another, I knew more people. And lastly, I planned to do the entire conference this year (being a newbie last year, I missed the Thursday afternoon fun of Gurupalooza, Ask the Developers and the Closing General Session).

So, along with the tens of other bloggers, I am submitting my summarized experience.

JumpStarts
These are so worth the extra day and the extra time. If they don’t directly provide you something you can use right now, they give you a good basis for exploring other things you can do with Notes/Domino. I got useful information on SOA (JMP402), salivated over – for just the first time this week – over the Eclipse SDK (JMP202), got to actually play with Eclipse a little in a hands-on and learned a lot more about DXL than I knew before (JMP302). I didn’t actually see Component Designer or Domino Designer 8 but I am really hopeful that they will incorporate a lot of the features of Eclipse, it is that cool.

General Sessions
Neil Armstrong! Genius pick! The response of the room and feeling I had when he came out were so different from last year. We had listened to a biography of him a few weeks back (First Man) and he came across as the same humble, likable guy he was portrayed as in the book. Thanks to Volker, we can go back to his presentation any time.

I can’t wait for Notes 8! The interface changes are outstanding and the composite applications are what we’re looking for to further leverage the Notes client. The Productivity editors are a great addition – and will be perfect once the LotusScript API is implemented. I also really like that there is an integrated RSS reader because maybe now I can really show others in my group the benefits of RSS.

Quickr looks very cool, and it’s great that the Personal Edition will be free. We’ve thought about looking at QuickPlace but haven’t been able to justify the additional cost. Now, we may be able to counter some of the lean toward SharePoint. And no additional software! No WAS, no Portal. Very nice!

Connections sounds like a good idea but will probably work best in large or geographically dispersed organizations where face to face (or over the cube wall) conversations can’t occur. I could also see smaller organizations that are idea/research driven get benefit from it. In looking at my own organization, we could benefit as a whole, but the IBM/Lotus base is so small, we wouldn’t get enough from it to justify the cost since it requires something beyond Domino to run. I liked Activities last year when they were demoed and they have certainly improved but we would still have a bit of a hard time selling the need for it given that we’d need another server to run it. Maybe my opinion will change if I can get some time with it at bloggingconnections.com.

The closing session with Neil deGrasse Tyson was really good. I had never heard of him and my first thought when he was introduced (as an “astrophysicist”) and he came out and said something about sharing thoughts “over the next 45 minutes” was “uh oh”. But he was really entertaining, even when telling us an asteroid passing close to Earth in 2029 (on Friday the 13th) might cause the destruction of life in 2036. Some of us, mostly bloggers, got a chance to talk to him for a few minutes afterward and he was very personable and gracious, and very relieved to hear that he had sufficient “geek cred” and had made relevant connections. It seemed an odd way to end though: he finished and there was a recorded announcement of “thanks for coming”. Maybe that’s usual though –it was my first closing session.

Sessions
Overall I was pretty happy with the sessions I attended. With the exception of just a couple, I can say I got something out of each one. I think my three favorites were Worst Practices (BP104), Writing Readable Code (AD502) and Designing the User Interface (BP101). I think Bill and Paul could do their Worst Practices every year because a) they are entertaining and informative and b) enough of us make mistakes for them to come up with 12 new things each year. Rocky’s session was really handy for comparing what we do to what other developers with more experience (and more co-workers) do. Our group tends to develop and maintain our own applications so this is good information for “succession planning”. Nathan and Chris presented some ideas that were way out of the traditional Notes-app box – and that is a very good thing. I had actually started experimenting with layers before, based on one of Nathan’s blog posts on one of the databases he demoed. I think they could easily do the session again next year with new and different interface ideas, and I’d probably attend again.

The OpenNTF and Blogger BOFs were great too. They definitely prove the vitality of the Lotus software community and the value that community can bring. As I said later to Ed Brill, I wish the Blogger BOF had included some time to see if anyone in the room was wondering how to start blogging. As approachable as this group of bloggers is, some people need to be approached rather than doing the approaching.

Other
Labs – If I am able to go again, this is one area I want to make time to visit. I was in the Meet the Developers and DPI labs but didn’t go in the Usability lab. I wish I had so I could spend some time on Notes 8 and all the other software that is coming.

Speedgeeking – This was phenomenal! With all the positive feedback and (I expect) word of mouth, this could get to be huge. And that would make it more difficult to pull off I think. A couple of things I heard and agree with would be larger tables (maybe rectangular and a small mic/amplifier for each speaker to accommodate a larger group.

Swan boat races – I had to bail on this (poor scheduling on my part – and thanks to Turtle for filling in for me) but it was a lot of fun to watch. Which leads me to…

Community – I hope everyone gets to the end of the week and gets a sense of the community among the people who use this software. I hope it isn’t just because of the group that I have connected with over the last couple of years. It started with one person I corresponded with through Notes.net and has grown from there. Maybe it comes from always feeling like we’re coming from behind (“Notes is Dead”, Notes has fewer seats sold, “there is a two-lane highway” – sorry, Alan) but the people I know care very much about this software, how it is updated and how it is perceived in the market. But most of all, they care about each other as people. And that is hard to beat.

Thanks for another great Lotusphere and I hope to be there again next year.

Friday, January 26, 2007

Lotusphere 2007: Final Day

Lotusphere 2007 is over. After a full five days, my brain is tired from everything that has been added - and my feet and legs are tired from all the walking.

Started the day (7am!) at the blogging Birds of a Feather. Lots of people were there, including a lot of the most common bloggers you hear about. This community has grown each year. I said last night that we need to give some focus to keeping the community growing so we don't just become an echo chamber. These people are all supportive of each other so contact anyone if you want to know more about blogging or wonder how to get started.

I did a hands-on about Low-Fidelity Prototyping. The idea is to develop the user interface first (before any coding) and use paper and pencil. That way the users can feel free to change anything to make it work better for them. It is a cool idea that I hope to try sometime soon.

The Great Code Giveaway, by Rob Novak (the LotusRockStar) and Viktor Kranz, had a lot of good things for web development. That doesn't affect me a lot right now but may come in handy later.

Gurupalooza got off to a kind of slow start but then got rolling. Probably the biggest thing that came out of that was bloggingconnections.com. That is where a Lotus Connections server will be, hosted by Chris Miller and Connectria, to help connect members of the Lotus community using the new Connections product.

Ask the Developers was pretty calm. Bob Balaban got razzed for not updating and finishing the LSX Toolkit, handed off the "traditional first question" and it went from there. The last question was whether Lotus would ever use Connections to back a social networking (eg. dating) site and one of the developers said they already had a name: the Quickr Picker Upper. It brought down the house.

The Closing Session featured Neil deGrasse Tyson, an astrophysicist with the research section of the American Museum of Natural History.

My evening closed with dinner with around 30 other bloggers. Ed Brill and Alan Lepofsky joined us, not as reps from Lotus but as friends and fellow community members. It was nice to talk with Alan, Ed, Bill Buchan, Andrew Kelly and others. Andrew was someone people lost track of during this past year and he said he was embarrassed that people had to work so hard to track him down. We finally settled (I think) that it wasn't necessary to be embarrassed, but to feel good that people cared enough to look.

Thanks to everyone for a great week. I need to take some time to digest everything and organize my thoughts, but I am excited to get back and start putting some of these new things to use. Hope to see you again next year (Jan. 20-24).

Tuesday, January 23, 2007

New (Radical?) Interface Ideas

Today, I attended the BP101 session on Why Interface Matters given by Chris Blatnick and Nathan T. Freeman. All I can say is "WOW!!" Talk about thinking out of the box! I can't even describe all the cool things they showed in Notes applications:
- All kinds of layers
- Editing without putting the document into Edit mode
- Embedded views and drag and drop in and out of folders

Then in the OpenNTF Birds-of-a-Feather (BOF) session, Nathan asked about something how we improve interfaces in Notes applications. Nathan, I think you just need to make your demo databases available in any manner possible. Yes, they involve more work but they are so innovative that they demand a closer look. The release of Notes 8 will provide the perfect opportunity for revamping applications since it will have such a dramatic effect on the overall user experience - the more people who can see these ideas, the better it will be.

Personally, I look forward to spending some time dissecting Nathan's demo databases and updating the interfaces on some of our apps.

Notes Phrases

I took two graphics that have been circulating and combined them so you can put them on your desktop if you want. Earlier in the year, the "Yeah, Notes can do that" meme was started as an adjunct to Lotus marketing. Then, right before Lotusphere, another idea (Notes Heroes) came out. I put the two of them together:


Let me know if you want a higher resolution version of the image.

Lotusphere 2007: First Two Days

There are plenty of people posting a lot of information about what has been going on here, particularly around the opening general session and all the announcements, so I won't just repost all of that same information. But I do have some observations.

It was very cool to see and hear Neil Armstrong. We just got done listening to a biography of him ("book on CD" called First Man) and learned what a humble man he is. In that sense, he was a perfect choice to speak because I find that many people in the Lotus community are a lot like him: willing to give whatever they can to help others in the community and dedicated to the common good.

I've been to a couple of things on web services and a number of sessions on the new composite application capability in Notes 8. I'm REALLY excited about what is coming with the new client. The code I have seen so far seems a little slow, but I still have only seen beta code running. You can do very cool things and do them very easily.

I also wish I were more of a Java developer because the Eclipse IDE is INCREDIBLY cool. I'm hoping to see more about updates to Domino Designer and explore Component Designer a little too.

Got some good information on writing readable code (my manager saw the session as well so I suspect there may be some new standards coming).

JAMFest was fun. Some interesting characters around (especially one dancing guy who galloped around the floor much of the night) and a few trainwrecks from the band. A good time had by all.

Off to breakfast and another long day. But it is all worth it in the end.

Monday, January 22, 2007

Tron

I got the 20th Anniversary edition of Tron for Christmas (yes, I asked for it). I put it on my iPaq and watched it on the flight down. Didn't quite finish it but it was fun to see it again. It definitely brought back memories. It was groundbreaking in its own way and deserves a look (or another look) if you haven't seen it for a while.

Sunday, January 21, 2007

SnTT: Lookup Names in Your Active Directory Global Catalog

We are a small Domino island is a large Microsoft sea. Recently, we implemented a web service that required access by non-Notes users to one of our Notes databases. As such, we needed a way to determine which documents those users were allowed to see and we decided to use their unique corporate identifier. Rather than forcing the users to type that information in (as well as the user's name so it was easy to identify) and/or look the names up manually in some external system, we developed a dialog that uses the Active Directory Service Interface objects.

The form enables a user to enter a full or partial last name plus (optionally) a full or partial first name. When the Search button is clicked, the code looks in the Global Catalog and returns the list of names and unique IDs. Due to the 64K limit on fields, the list will only return 1000 names and will inform the user that there are more names and that they should refine their search term to reduce the list.

In the code, doc.SearchString is the field on the dialog where the user enters what they are searching for. You need to replace GlobalCatalog.url with the path to your global catalog. I did not include the code but we also implemented a sort routine to provide the returned list in alphabetical order.



Sub Click(Source As Button)
Dim ws As New NotesUIWorkspace
Dim doc As NotesDocument
Dim objConnection As Variant
Dim objCommand As Variant
Dim LastName As String
Dim ID As String
Dim FN As String
Dim LN As String
Dim nameSearch As String
Dim NameList() As String

Call NEMEnableWaitCursor
Set doc = ws.CurrentDocument.Document
Set objConnection = CreateObject("ADODB.Connection")
objConnection.Open "Provider=ADsDSOObject;"

Set objCommand = CreateObject("ADODB.Command")
Set objCommand.ActiveConnection = objConnection

If Instr(doc.searchString(0),",") = 0 Then
nameSearch = "(sn=" & doc.searchString(0) & "*));"
Else
nameSearch = "(sn=" & Strleft(doc.searchString(0),",") &_
"*)(givenName=" & Strright(doc.searchString(0),",") & "*));"
End If

objCommand.CommandText = _
";" & _
"(&(objectCategory=person)(objectClass=user)" & _
nameSearch & _
"sAMAccountName, givenName, sn;subtree"

On Error Goto LookupError
Set objRecordSet = objCommand.Execute
On Error Resume Next

x = 0
Redim Preserve NameList(x)
While Not objRecordset.EOF
ID = objRecordset.Fields("sAMAccountName").value
Redim Preserve NameList(x)
If Isnull(objRecordset.Fields("sn").Value) Then
LN = ""
Else
LN = objRecordset.Fields("sn").Value
End If
If Isnull(objRecordset.Fields("givenName").Value) Then
FN = ""
Else
FN = objRecordset.Fields("givenName").Value
End If
NameList(x) = LN & ", " & FN & nl & " (" & ID & ")"
If x >= 1000 Then
Messagebox "Your search produced a very large list of names so the list only " &_
"includes the first 1,000 found. If the name you are looking for is not in the list, " &_
"try searching again with more of the last name and/or first name.",64,"Large Result"
Goto DisplayIt
End If
x = x +1
End If
objRecordset.MoveNext
Wend

DisplayIt:
Call NEMDisableWaitCursor
If NameList(0) = "" Then
Messagebox "No users found meeting your criteria; please revise " &_
"and try again",64,"Name Lookup"
Exit Sub
End If

objConnection.Close

doc.searchResults = sortValues(NameList)
Call ws.CurrentDocument.Reload
Call ws.CurrentDocument.Refresh
Exit Sub

LookupError:
Messagebox "The search caused an error, most likely because you " &_
"are not on the network. Please try the lookup again later.",48,"Error"
Call NEMDisableWaitCursor
objConnection.Close
End
End Sub


This LotusScript was converted to HTML using the ls2html routine,
provided by Julian Robichaux at nsftools.com.


Technorati: