Hello community,
I have a simple question, I want to filter on a list of keywords, by creating an IF node and adding expression by expression will be time consuming, there is a way to add a bulk of exclusion keywords ?
Best,
Mahdi
Hello community,
I have a simple question, I want to filter on a list of keywords, by creating an IF node and adding expression by expression will be time consuming, there is a way to add a bulk of exclusion keywords ?
Best,
Mahdi
Hey @TheG,
Quick way would be to use a code node and add all of your terms in an array and process the list that way.
Hey @TheG,
I didn’t but I just popped this together, This will take a list of input names and if the name is not in the list it will pass them to the output.
I’m curious @TheG if the following improvement to If node would solve your pain point:
It’s an internal concept we have, so feedback on whether that would be helpful could help prioritize implementing it.
@maxT a feature like that which is easy to understand in the GUI would be nice, right now I use regex \b(foo|bar|word3)\b
for cases like that.
But it would be a lot more readable, especially to colleagues without knowledge of regex, to have “Is one of” as an GUI option.
You can do this with an expression, by putting all your options in an array and using Javascript’s includes()
function, like so:
{{ ['US', 'UK'].includes($json.country) }}
Example workflow:
That will be definitly helpful and native, nevertheless the solution provided from @Jon worked smoothly.
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.