From: Craig B. <sys...@ca...> - 2003-09-17 01:09:46
|
> I'd like to be able to filter on boolean fields. For example, I'd like to > show all records where a boolean field is checked or alternatively not > checked. Already implemented. Search on a value of 1 or 0 in the boolean field. Or via script, in the search field or filter use: (eq (int %[field number]) 1) for all checked boxes (eq (int %[field number]) 0) for all un-checked boxes Notes: Replace [field number] with the boolean field you're searching on. This script simply means, show all records for which the field specified (cast as an integer) are EQual to 1 or 0. > Also, when editing text numeric fields, it would be nice to be able to do > addition and subtraction. For example, suppose that the curent value of a > field is 47 and I want to at 32 to it to get 79 as the field value. > It would be nice to be able to append +32= and have the value 79 be > calculated. This feature would be really useful when using pilot-db > to keep track of numbers of birds seen while bird watching. One might see > 325 starlings and then later see 180. As it is now, I do the addition in > my head, scratch out the 325 and put the new sum. It would be nice to > just record the addition and have it be so. In the manual, the scripting is quite powerful. http://pilot-db.sourceforge.net/doc.htm Specifically I'd suggest the sections: Calculated Fields: http://pilot-db.sourceforge.net/doc/en/ch04s03.html#id2765141 Scripts: http://pilot-db.sourceforge.net/doc/en/ch09.html For your example I'd use one record for each "sighting" and use an inter-record sort and script to tally the totals for each bird type. Inter-record script example: http://pilot-db.sourceforge.net/doc/en/ch09s04.html As an alternative, one could also use a pop-up calculator. For example I use the DA "CalCal" http://www.bea.hi-ho.ne.jp/kish/palm/palmware.html And the DA launcher "DA Launcher 5.0b6" http://www.simple-palm.com ...on my OS5 device. You can bring it up with out exiting the DB record you're working in, and tap on the calculated result to copy it to the clipboard, then paste it into the DB field you're working with. from the file area a pilot-db.sourceforge.net and review the scripting section. |