Hi Stephan
Thanks for the reply. Jeremy has informed me that, where a filter uses
field contents, these are not wikified. The field I wanted to sort by
contains a macro call - the way filters work means that it treats the macro
call as plain text, so sorting on this field will not work. This field
needs to be a concatenation of a field from another (variable) tiddler and
a field from the current tiddler, so I cannot see any way of avoiding a
macro or transclusion in the field.
I have now found other ways of achieving roughly the results I wanted.
Best wishes
Howard
On Thursday, June 5, 2014 5:24:32 PM UTC+1, HowardM wrote:
>
> I have a list widget with the filter sorting by a field which contains
> just a Javascript macro call of the form <<macroname>>. I can sort
> successfully by any other field and transclude the macro field within the
> list widget, but sorting by the macro field gives a sort by title.
>
> The situation is fairly simple - I have a set of tiddlers for areas and a
> set for actions. One of the action fields contains the title of an area
> tiddler and I want to pick up the value of a field for this area (always
> the same field) and concatenate it with an action field. Each of the two
> fields concatenated contains one alphanumeric character, the area titles
> are one upper case letter. I use the macro to carry out the
> concatenation. When I transclude the macro field into any tiddler (not
> just the tiddler it belongs to), I get the right result - the only problem
> is using it to sort.
>
> I only got as far as testing the approach, so have only put the macro
> field into a few action tiddlers. I stripped down what I was doing to try
> to find the root of the problem but even the following simple filter
> ('fullorder' is the macro field) gives a sort by title, though it does show
> all the relevant tiddlers & their macro field values:
>
> <$list
> filter="[has[fullorder]sort[fullorder]]">{{!!title}}-{{!!fullorder}}
> </$list>
>
> The macro is also straightforward with its operational part consisting of
> just:
>
> exports.run = function( ) {
> return "<$transclude tiddler={{!!areacode}} field='stage'/><$transclude
> field='order'/>";};
>
>
> I would appreciate advice on ways of achieving the result I want, either
> by modifying my current approach or by a different route.
>
>
--
You received this message because you are subscribed to the Google Groups
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/tiddlywiki.
For more options, visit https://groups.google.com/d/optout.