This code is working. But I want to modify it for more general usage.
Currently in the filter for filter-steps-combined set widget, sub-rad is hard-coded. I want sub-rad to be replaced by something like sub-<filter-step-1> because it depends on the value of <filter-step-1>
When value of <filter-step-1> is rad, my code works. But if value of <filter-step-1> is tw, I have to change it to sub-tw.
How to to this ?
Can someone give some suggestions …I don’t want a complete solution, just some suggestions will do…so that I can try them out. I am running out of ideas now
You may be familiar with the wiki, the problem, but when I look there is a large cognitive overhead just to workout what the question is, let alone consider the answer. So don’t expect many answers.
Your short reply indicates you have not read my reply, because you reply telling me something I already know, and ignore all my suggestions.
You can ignore my advice but don’t be surprised if people ignore your questions.
We are all volunteers here and fixing your wiki is harder and less useful to others than it would be to provide a clear answer based on a clear question, that a general audience can make use of.
Perhaps you could use value= instead of filter= in your $set widgets (or use $let). That way, you’re just building strings which are not evaluated until you use them as filters. Then you can build the subfilters as strings. And then you can pass the correct combined string to wherever you need to use it as a filter.
I want to populate the storyriver with tiddlers based on a filter created using multiple select widgets and set widgets. Select widget is used to assign certain field values…these field values are used to assign variables using set widget…I want to combine these variable into a final filter run filter-steps-combined
I guess the issue is at the <<filter-step-2>> which is not giving the correct results.
What do you expect this to do?, I can’t find sub-tw any where else?
To me this [sub-tw[filter-operators]] reads as if the field sub-tw has the value “filter-operators” and is a logical test. so will not change the the input, which is implied as all[]
But it’s returning the wrong result of filter-operators
Where as it is supposed to return addprefix-operator and addsuffix-operator.
That’s why I am assuming that if filter-step-2 is fixed, the final-filter may also be fixed. Just my assumptions.
all[] was actually not there, I tried may combinations to get some result. In that process all[] came. I forgot to remove it before saving the tiddlyhost wiki.
You have an operator in var1 and a parameter for that operator in var2 so that when combined you end up with a “string”, to be later used as a filter that look like this [var1[var2]] where the var(s) are replaced with their value?
If you dont want to build the whole combined filter in a single back tick attribute you can use a few and put them together with the subfilter operator.
There are other ways to join filters using functions so if you give some simple examples we may be able to explore these.