Pimlical Android Help

Share Details Template

The Share Details Template is used to format the text of an entry that is being shared with another application in the Android system. The template is stored in the file sharedetailstemplate.txt located in the Pimlical folder. This file is automatically installed by Pimlical from a default template in the program when this command is first used. This file can be freely edited by the user to change the way in which the text is formatted. This is of course a feature for Power Users and requires some study to get familiar with how to format commands (if you choose to do this, it is recommended that you turn on Debug mode so that any error messages appear in a dismissable dialog rather than a quick message that flashes on the screen)

Formatting in the Template File

There are some simple formatting commands that allow control over what gets put in the shared text. All information is presented in standard Ascii Text format that should be read by any Android program that can handle raw Ascii Text.

All text in the template file appears in the shared text. In that text, Pimlical searches for the special character - the opening bracket ( [ ). From the opening bracket to the closing bracket, Pimlical takes this as a request to extract data from a field in the record and format it in a certain way. The format of this request is:

[fieldname, FieldLength, format, Justify-left/right/center]

where fieldname is the name of a field in the record (see Appendix D for list of calendar database fields). And where the justification characters are < > = | (< = flush left, > = flush right, = = center, | = no padding).

For example, [description,50,=] would take the description field of the record, truncate it to 50 characters if necessary and then center it within a 50 character field. The format parameter is only used for date and time to indicate what format to use (1 = short, 2 = medium date/long time, 3 = long date).

The backslash character ( \ ) is used to copy over the next character in the template without having Pimlical attach any special meaning to it. For example \[ can be used to insert a square bracket into the template file without having Pimlical think that it is the start of a request to extract data from the current record.

Special Fields

In addition to the standard calendar fields, there are some special fields that can be used in the template. Each of these fields starts and ends with a square bracket and takes up a line by itself

[ShareTemplate] this field must always be present as the first line in the share template, or the program will not recognize this file as a valid Template for use with this command.

[DisplayDurations:{description}] causes Pimlical to display the total sum of all the durations of all events that are being shared (the colon is part of the tag). After the colon can be a description that is displayed ahead of the duration value such as Total Time Spent:. This is displayed after all the records have been added to the shared text. At this time, since the Share command can only be invoked on a single item, the duration will just be that of the currently selected event.

[DisplayCosts:{description}] causes Pimlical to display the total cost associated with all the events that are being shared (calculated from the sum of all the durations multiplied by the cost per hour figure). After the colon can be a description that is displayed ahead of the cost value such as Total Cost:. This is displayed after all the records have been added to the shared text. Again, at this time, this command only calculates the total cost for the currently selected event.

[CostPerHour=125.50] sets the cost per hour value that is used to display the total cost in the above field.

Special Action Tags processed for the Share Function

There are two Action tags that can appear in the record itself and which have special meaning in the Share function:

AddTime: is followed by a Pimlical Duration string (i.e. 3d2h or 2h3m or 30m etc.). This duration value is added to the duration of the event and is used in the Display Costs calculation. A typical use is with a quick entry template that has no duration and adds a fixed duration (such as a minimum/fixed billing interval).

Add$: is followed by a currency value (see section on Action Tags for definition of a currency value). This cost value is added to the accumulated value of Display Costs. A typical use is to add some fixed cost with a quick entry template (such as standard travel time billings, etc.).