Text substitution is unfortunately still quite clumsy in filters. Personally I use a custom filter that allows syntax like: focus={{{ [[section.lox-tiddler:nth-child($(nth)$n+1) button]printf[]] }}}
or focus={{{ [[section.lox-tiddler:nth-child($0$n+1) button]printf<nth>] }}}
You can also use a macro like the .printf example that I provided in this thread to do text substitution for you.
Lastly, wikify should be avoided for performance reasons. However, using wikify within a macro that will be assigned as the actions of a triggering widget like $button is probably one of the areas in which the performance impact will be least felt. The actions are only parsed when they are invoked and thus refresh performance is less of a concern.
For future reference, you can use triple double quotes """ for widget attributes and for the selector you can use the escapecss[] operator to make sure you have a valid selector.
I have to tidy up before. I am building a filter for a grid that is formatted by tiddlerfields.
Therefore I have multiple values I need to concatenate by wikification which results in a very messy code. Replacing 4 wikify by 2 let expressions would be nice.
This is now achievable for anything that can be expressed as a filter, because a function returns the result after evaluating the filter, and as text (First value only).
Within this you can use parameters as variables [<varnam>] or the substitute operator.
And also for any substitution we can use the new parameters and backticks.
However if we return to the original question wikify is used to generate a string including a value of a variable;