Search PalmPower's 487 Palm-related article archive 
Home
EasyPrint
News details Click here for the RSS feed's XML code. This is not a browser URL.
Articles-only 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. Roll over 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. Roll over 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. Roll over 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.


« Previous  ·  1  ·  2  ·  3  ·  4  ·  5  ·  Next »
Other articles you might like
Home > Phones and PDAs > Palm and Treo > Programming (24 articles)
   How PDA software is born
   Program with Simplicity
   Kinectivity 2.0 brings enterprise application developers new tools
Home > Reviews > Enterprise (7 articles)
   LinCo Services drives efficiencies with handheld route delivery application
   Super productivity: it's in the Palm of your hand
   Collaboration on small devices with Wiki
Get Weekly Email Updates
Subscribe to our regular weekly email newsletter. It's packed with tips, reviews, deep analysis, and the latest news.
 
Other PalmPower Articles
Palm gets up to date with new Tungsten family of handhelds
Create handwritten email with riteMail
Presenter-to-Go puts PowerPoint presentations on your Palm OS handheld
Looking for the cutting edge
Gain remote access to databases and PLCs
PalmSource Open House showcases what's new in the Palm community
Analysis: handheld market share
More from the ZATZ journals
Computing Unplugged: The iPad defenders have spoken
David Gewirtz Online: CNN commentary and analysis
DominoPower: Application development, William Shatner, and the origin of the universe
OutlookPower: More about disappearing text
-- 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.

ZATZ Home  ·  News  ·  Back Issues  ·  Credits/Trademarks ·  Link To Us
Copyright © 1998-2010, ZATZ Publishing. All rights reserved worldwide.
Editor's Login