How to filter by field with a certain prefix in the value?

115 views
Skip to first unread message

Surya

unread,
Jan 19, 2018, 12:54:19 PM1/19/18
to TiddlyWiki
Hi all,

I have ToDo-tiddlers with due-fields. For example: One tiddler has in the field 18.03.15, another tiddler has in the due-field 18.03.23 and a third one has 18.04.11.

Is it possible (and how?) to filter these tiddlers in lists by due-field with the prefix 18.03? In order to see only the one with 18.03.15 and the one with 18.03.23?

Thanks for your help! Surya

Mark S.

unread,
Jan 19, 2018, 1:03:24 PM1/19/18
to TiddlyWiki
The regular expression operator should do it:

<<list-links "[regexp:todo-field[^18.03]]">>

-- Mark

Surya

unread,
Jan 19, 2018, 1:36:23 PM1/19/18
to TiddlyWiki
Hi Mark,

Thanx, but I have to specify my question.
Just inserting [regexp:todo-field[^18.03] after [tag[ToDo] didn't work.

I have a list with popups with this:

\define makeState()
<<qualify $(stateTiddler)$>>
\end

<div style="background:Lightgoldenrodyellow;">

<$list filter="[tag[ToDo]sort[due]]" variable="mytitle">

''Fällig am: ''<$edit-text tiddler=<<mytitle>> field="due"/>

<$set name="stateTiddler" filter="[<mytitle>addprefix[$:/temp/state/]]" emptyValue=error>
<$wikify name="qualstate" text=<<makeState>>>

* <$button class="tc-btn-invisible" popup=<<qualstate>>><$text text=<<mytitle>>/>
</
$button>

<$reveal type="popup" position="below" state=<<qualstate>>>
<div class="mypopup">
<$tiddler tiddler=<<mytitle>>>

<$transclude tiddler=<<mytitle>>/>

</
$tiddler>
</div>
</
$reveal>
</$wikify>
</
$set>
</$list>

<style>
.mypopup {
    min-width: 380px;
    border: 1px solid #bbb;
    background-color: #ffffff;
    padding: 1em;
    margin: 4px 0 0 0;
    text-shadow: none;
    line-height: 1.4;
}
</
style>

How do I have to insert the regular expression operator in this list?

Mark S.

unread,
Jan 19, 2018, 1:45:42 PM1/19/18
to TiddlyWiki
This should work:

[tag[ToDo]
regexp:todo-field[^18.03]sort[due]]

Surya

unread,
Jan 19, 2018, 2:03:33 PM1/19/18
to TiddlyWiki
Ahh, I found the mistake.
I described it wrong: The field is not called "due-field" but only "due".

So, the right is now (maybe, others have a similar question):

\define makeState()
<<qualify $(stateTiddler)$>>
\end

<div style="background:Lightgoldenrodyellow;">

<$list filter="[tag[ToDo]regexp:due[^18.03]sort[due]]" variable="mytitle">

Thank you :-)

Now I have for 99,9% that kind of ToDo-List, I wanted.
Don't waste too much view-space, small in MB-size, always only shows me what I need to see and relative simple to edit the due-dates of the recurring tasks :-)
Reply all
Reply to author
Forward
0 new messages