Hi Tobias, I'm looking for an answer to the same question as
Mr. Mal above is. Here's my use case.
I have tiddlers tagged
Phone Number , which contain the fields:
countrycode, areacode, exchangecode, phonenumber, type, purpose, owner. The first four of those contain numeric values only. The
type* field contains values such as
Landline, Mobile, Freephone. I have a ViewTemplate which formats and displays the fields as a proper phone number, such as:
+<$view field="countrycode"/>-<$view field="areacode"/>-<$view field="exchangecode"/>-<$view field="phonenumber"/>
The problem is, I recycle the same fields regardless of whether a Phone Number is a landline, mobile, or freephone number, all of which have slightly different formats, particularly the freephone ones. I want to be able to somehow evaluate the value of the
type field, and format the output accordingly. For instance, a freephone number should be formatted as:
0-800-<$view field="exchangecode"/>-<$view field="phonenumber"/>
Is there some way of doing this using your
eval[ ] filter plugin, or any other way of doing it?
* Yes, I know that
type is a reserved fieldname in TiddlyWiki. I'm still coming up with a replacement field name. Any suggestions gratefully accepted. This is for my
{{DesignWrite}} semester project,
TiddlyCRM.
Hegart.