Friday, January 29, 2010

New License Plate

So I finally did it...after whining about getting a custom license plate for my car I took the plunge and here it is! PCMUSEUM is exactly what I wanted and now that Ontario offers 8 digit plates I was good to go! Of course, I had to accessorize it with a "WILL WORK FOR BANDWIDTH" plate holder that I picked up from

So if you're out driving around town and you see this plate, you'll think of the Personal Computer Museum and come pay us a visit sometime!

Tuesday, January 19, 2010

Auto Incrementing with InfoPath

So instead of my usual conversation, I thought I'd add a "practical" technical experience I went through because I was not able to find the solution to this particular problem online. If I couldn't find it, perhaps other people out there have had similar issues.

I've been using Microsoft's InfoPath to create a form for Human Resources to do Performance Reviews. Various sections include parts where I wanted to put in a repeating table and although I found ways to "auto increment" an area there to number the entries the user added dynamically, I did not want to use numbers. You see, my sections are numbered and therefore this would just look wrong. It would be much better if my entries were incremented with letters starting with "a".

I wanted my repeating table to look like this:

1. Indicate the primary responsibilities of the position:
a) | User types in section A
b) | User types in section B

So in this table (with two columns, the "a)" is in a column by itself) I set the first "a)" to be an Expression Box. Then you can right click on it and select "Properties". The data source should be "XPath" and set the function to be:

concat(substring("abcdefghijklmnopqrstuvwxyz", position(), 1), ")")

What this function does is concatenate (join) the letter of the alphabet based upon how far down the list you are, and then adds the ")" at the end.

You can make this work with uppercase letters or change the ")" to a "." or whatever you want.

Seems easy once you set it up, but I struggled a bit at first finding where to put this. My programming background came in handy to create the function itself.