Filtering when a field contains a link

Field ‘sr-type’ is set to value ‘[abc]’ for some tiddlers and to value ‘abc’ for some others. Note the square brackets.

<$list filter="[sr-type[abc]]">
<$link/><br>
</$list>

returns tiddlers where st-type is set to ‘abc’.

What expression do I use to pick up tiddlers where sr-type is set to ‘[abc]’?

I could use contains:sr-type[abc] but that returns tiddlers that are tagged [abc], [def], etc.

The problem is that you want to use a filter operand that includes square brackets, but square brackets are used by the filter syntax itself to delimit literal values, so there’s no direct way to specify the desired value. The workaround is to put the value into a variable, and then reference that variable in the filter syntax, like this:

<$vars value="[abc]">
<$list filter="[sr-type<value>]">
<$link/><br>
</$list>
</$vars>

-e

@EricShulman Thanks.

This worked perfectly.