When you use the let to assign the resulting list to the variable voter, the filtered transclusion assignes only the first title. Try adding at the end of the filter +[format:titlelist[]join[ ]] but then when you use that variable you may need to use the enlist operator to turn it back into a list.
I suggest using your filter in a list widget first before you start making its use more complex as in storing within a variable.
Which is what I belive the advanced search filter tab is doing with the filter you provide, ie uses $list
If you put the filter into a function as long as you use it the right way (inside a filter) it will return the list of titles.
I notice that in your $:/AdvancedSearch filter, you are using literal strings [FRED] and [FLINTSTONE], but in your template code, you are using {!!contributor-first-name} and {!!contributor-last-name}.
Even though I was tired, I spent the 15 minutes anonymizing my data before posting it. And then I posted the unanonymized version. D’oh! (This is all data in the public record, but I still didn’t like posting it.)
I’ve fixed that in the attachment above, and the FRED FLINTSTONE test should now work in Advanced Search > Filter.
I don’t think I explained very well. I was too tired and should have waited to post until today. I apologize.
I do expect there to be at most one matching result, and if by chance there’s more, I can live with matching the first one. My trouble is that it’s matching none.
Well the literal version for Advanced Search was just to show that the filter does do what I want it to when I pass the right data. I often develop filters in Advanced Search before moving them where I want and replacing the literals with whatever dynamic version I have. I was surprised when this didn’t work.
I will try your version when I’m home again. But I don’t see how it would be different. from the original.
I forgot to mention in the original that the code in question is in the bottom section of the ViewTemplate $:/_/avl/templates/Voter
Update: I just fixed the title, “in a LetWidget”, not “in a ListWidget”. Double-d’oh!
I think Eric is spot on here unless as I am guessing its unlikely the field contributor-first-name is in the tiddler tagged Voter, but instead its in the donation tiddler?
Thank you. Somehow I didn’t understand it when Eric suggested it, even though it’s crystal-clear on rereading. But this made it clear to me. I’m sure that’s it. I will check this evening.