I got it. 

I had to add a set

\define my-contacts(team role)
  <table>
    <th>ROLE</th>
    <th>NAME</th>
    <th>TEAM</th>
    <th>LOCATION</th>
    <$set name="role-pattern" value=$role$>
      <$list filter=
"[tag[person]team[$team$]regexp:role<role-pattern>sort[role]]" template=
"$:/core/ui/ListItemTemplateContacts"/>
    </$set>
  </table>


\end


On Tuesday, 10 September 2019 13:52:57 UTC+1, Christian Macedo wrote:
>
> I'm creating a tiddler with team member details and have a macro I can 
> call whose purpose it is to filter that list by a tiddler field. 
>
> \define my-contacts(team role)
>   <table>
>     <th>ROLE</th>
>     <th>NAME</th>
>     <th>TEAM</th>
>     <th>LOCATION</th>
>       <$list filter="[tag[person]team[$team$]role[$role$]sort[role]]" 
> template="$:/core/ui/ListItemTemplateContacts"/>
>   </table>
>
> \end
>
> The filtering issue occurs when I have team members who can have the title 
> 'Android Developer' or 'iOS Lead Developer'. 
>
> How can I use regex *and* the macro variable `role` (given I'm passing 
> the value `Developer`) to match any contact with `Developer` in their role 
> title? Regex isn't a requirement. Just the first option that came to mind. 
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/c869cd04-727a-448e-a96a-19a1bfb2304f%40googlegroups.com.

Reply via email to