Email:   
Home
In This Issue
EasyPrint
Click here for the RSS feed's XML code. This is not a browser URL.
Managing expenses with Palm and Notes (continued)

FIGURE D

Make a claim after recalculating the expense items. Click picture for a larger image.

You can then print the claim form directly out of your Notes application, and you're done. All your back claim forms will be stored, so you'll have a history of all the claims you've made, which is a great way to check that they've been paid.

When I put this together, I had a few key requirements for this application. I needed it to be able to calculate mileage for my car usage, and I needed it to be able to handle multiple currencies and the fluctuating exchange rates between them. I needed to be able to update parameters such as exchange rates and mileage rates easily, without altering code. Above all, I needed it to be simple and totally accurate. Here's what I did to make that happen.

The Notes components
The first thing I had to do was to find out what the information transferred from the Palm device looked like. Specifically, I needed to know how it transferred the expense types and the currencies. I found this out by exploring the PylonExp database that came with Pylon. In fact, my database was developed straight from this one.

In that database, you'll see that the field called Type is a dialog list field, and the choice list shows both the expense codes and their descriptions. TypeDesc also converts the values in Type to the descriptions. The field called Currency likewise has a list of countries and an arbitrary code value for that currency, including the four custom currencies. The field called CurrencySymbol contains the currency symbol ($, £, FRF, and so on), but the Pylon-supplied database doesn't use this field.

Armed with this information, I created a profile form. Figure E shows what this looks like to the user.

FIGURE E

Here's the profile in edit mode. Click picture for a larger image.

This holds information about me that gets entered on the expense claim, such as name, department, payroll number, and cost center. It also contains information about my car, including engine size, company mileage rate, and fuel type. Then there's a table of currency conversion rates for the various currencies the Palm device supports. The Palm device values are 0 through 23 for the standard 24 currencies, and 128 through 131 for the four custom currencies.

I only support custom currency 1. Actually, in my profile I ignored currency 22 because this is the UK pound, and since I live in the UK, the exchange rate will always be 1. Obviously, if you live in a different country, you'll make different choices.

My profile also contains a set of conversion values for the Palm Expense types to Unipart's internal expense codes. Unipart no longer needs to put these on expense forms, so I won't discuss these further. Doing all this on a profile meets my requirement for simple management of the static data.

Expense item form
Next, I modified the regular PylonExp.nsf expense form, as seen Figure F.

FIGURE F

Here's my modified Expense item form. Click picture for a larger image.

This is where all the calculations using the profile values are done. By doing it all here in this form, rather than when I prepare the final expense claim, I can have the views in the database show the fully extended expense items with all the calculations done. One thing worth noting before we look at the changes I made is to note the field called Mileage. This field is filled in by Pylon for mileage expenses type 16, so you'll have to treat type 16 expense items differently than all others, as can be seen below.




[ Prev | Next ]

ZATZ Home  ·  News  ·  Back Issues  ·  Credits/Trademarks ·  Link To Us
-- Advertisement --

NO HASSLE PHOTO PRINTING, SHARING, AND STORAGE -- AS LOW AS $2.54 PER MONTH
Discover an easier way to share, print and manage your photos online! Get your own online photo album site for sharing photos, as well as easy-to-use editing tools to make sure your photos look their very best. You can even order high quality prints directly from your album -- and have them delivered right to your door!

Best of all, you can also get login-free photo sharing at your personal domain name (if you have one), so your friends and family don't have to hassle with signing up or logging in just to view your pictures. It's the perfect solution for sharing, printing and storing all your favorite images!

And it's only from The Duck! Tap here to get started.

-- Advertisement --

Write for Computing Unplugged!
Share your experience and expertise with other handheld device users. There are new opportunities at ZATZ for contributing authors and editors.

Write about something you're an expert on and get your name in lights.

For Writers' Guidelines and to discuss topics, contact Staff Editor Steve Niles. This is your opportunity to shine in front of your peers, your clients, and friends.

Click for more info!

Copyright © 1998-2008, ZATZ Publishing. All rights reserved worldwide.
Editor's Login