Once again, the syntax is different inside a filter. When referencing a
variable, use ...regexp<variable>...
However, since you're really just looking for a prefix, maybe use the
prefix operator (prefix[]). Here's how I could do what you wanted using the
prefix operator and a variable (catcolon) to concatenate the colon:
\define catcolon() $(pfix)$:
<$set name=pfix value={{!!title}}>
<$list filter=
"[!has[draft.of]tag[task]!tag[done]sort[created]prefix<catcolon>]">
<$checkbox tag="done"> <$link to={{!!title}}><$view field="title"/></$link
></$checkbox>
</$list>
</$set>
If you wanted to concatenate a title with a tilde, then you could use
instead:
\define cattilde() $(pfix)$~
<$set name=pfix value={{!!title}}>
<$list filter=
"[!has[draft.of]tag[task]!tag[done]sort[created]prefix<cattilde>]">
<$checkbox tag="done"> <$link to={{!!title}}><$view field="title"/></$link
></$checkbox>
</$list>
</$set>
HTH
Mark
On Saturday, September 3, 2016 at 2:09:19 PM UTC-7, Ivan Aparicio wrote:
>
> Do you know if it's possible to concatenate the field (or title) with the
> colon that follows it? I'm trying to distinguish between project tasks -
> Project1:Task1 and Project1~Log1. I've been reviewing the docs and it seems
> that it may be possible to do this with a macro, but I can't get a match
> with the regex. The macro that I'm using is:
>
> \define projectRegex(regex:{{!!title}}:\w+)
> $regex$
> \end
>
> I then use regexp[<<projectRegex>>] in the code above, expecting to see a
> filtering, but both Project1:Task1 and Project1:Log1 are returned.
>
>
>
> On Saturday, September 3, 2016 at 3:12:12 PM UTC+1, Mark S. wrote:
>>
>> I don't know if this is your only problem, but when used in a filter I
>> believe the syntax for transclusion is ...regex{!!title}...
>>
>> HTH
>> Mark
>>
>>
>> On Saturday, September 3, 2016 at 4:51:46 AM UTC-7, Ivan Aparicio wrote:
>>>
>>> Hi everybody,
>>>
>>> I'm new to TiddlyWiki and I'm trying to use it to create a
>>> project-specific to-do list. Please bear with me if this is a pretty simple
>>> question, but I think I may need to use a tiddler field (tiddler title) as
>>> a filter argument. Let me explain:
>>>
>>> Each project is a tiddler with a task list, let's say it's called
>>> Project1.
>>>
>>> Each task is named with the following convention Project1:Task1.
>>>
>>> The Project1 tiddler has the following wikitext, styled after the
>>> TaskManagementExample tiddler on tiddlywiki.com:
>>>
>>> ! Outstanding tasks
>>>
>>> <$list filter="[!has[draft.of]tag[task]!tag[done]sort[created]
>>> regexp[{{!!title}}]]">
>>>
>>> <$checkbox tag="done"> <$link to={{!!title}}><$view
>>> field="title"/></$link></$checkbox>
>>>
>>> </$list>
>>>
>>> ! Completed tasks
>>>
>>> <$list filter="[!has[draft.of]tag[task]tag[done]sort[created]
>>> regexp[{{!!title}}]]">
>>>
>>> <$checkbox tag="done"> ~~<$link to={{!!title}}><$view
>>> field="title"/></$link>~~</$checkbox>
>>>
>>> </$list>
>>>
>>> Please note that I've added a regexp filter operator to only find the
>>> tasks relevant to Project1. I get this to work when I put the operator
>>> regexp[Project1], but I would like this wikitext to work on all of my
>>> project tiddlers.
>>>
>>> I hope that's clear. Does anybody know why this doesn't work?
>>>
>>> Thanks!
>>>
>>
--
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 https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit
https://groups.google.com/d/msgid/tiddlywiki/90da725c-436a-440d-8736-f1242cf4d6d9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.