|
|
|
|
|
|
|
|
|
|
Managing expenses with Palm and Notes (continued)
I added the field CurrSym to contain the currency symbol for all items except type 16. I always have mileage expenses credited in UK pounds, regardless of where they were incurred. This field has the value formula:
@if(type="16";"";CurrencySymbol).
|
I then added a new field, StgAmount, to hold the sterling amount of the claim. This field formula is as follows (with some rather repetitive bits removed):
Exchrate:=@If(currency = "1";@GetProfileField("Profile";"rate_1");
currency = "2";@GetProfileField("Profile";"rate_2");
........ as above for currencies 2 through 20 ........
currency = "21";@GetProfileField("Profile";"rate_21");
currency = "22";1;
currency = "23";@GetProfileField("Profile";"rate_23");
currency = "128";@GetProfileField("Profile";"rate_128");
1);
REM "Currency 22 is the UK";
@If(type = "16";0;amount/exchrate):
|
Note the exchange rate for currency 22, the UK pound, is set to 1, and the amount is set to zero for type 16 expenses, mileage. Mileage is handled with another field, Milescash, with the following formula:
I also added a field called Claimed; this tells whether the item has been claimed or not. I use this to control how items appear in views.
Views I then modified some views. The Expenses view, shown in Figure G, is the default view.
FIGURE G
The Expenses view is the default view. Click picture for a larger image.
It shows all expense items categorized by year, Palm category, and the currency; I also separate mileage claims in this view. The Claimed field drives an icon column showing whether the item has been claimed or not. The key items on this view are the actions.
The Recalculate action performs the following:
@PostedCommand([ToolsRefreshAllDocs])
|
This causes each document to be recalculated with its form, using the formulas above. In fact, I hardly ever edit an individual item, and then it's only to add a longer description than I entered on the Palm device.
The other key action is Make a Claim, but before we look at this action, there's another form to review. This is the claim form. This form was drawn to match Unipart's standard expense form layout, with twelve repeated rows in the body of the form. This is an exercise in creating Notes tables, along with split cells and lots of fields to add. I let the Notes designer name the fields as I cut and pasted them, but it was still pretty tedious going through all those computed fields and adding the formula entries. In hindsight, I should have left them as Editable fields to save the bother. Figure H shows part of this form in the Designer.
FIGURE H
Here's the Unipart expenses claim form in the Designer. Click picture for a larger image.
[ Prev | Next ]
|
|
|
|
|
|
|
|
|
|
|
|
|