I’ve tried utilizing split(",") and formulamap() since I believe that has to be the key but I may not fully understand the proper syntax.
I want Row 1 to produce Apples and Bananas
Help is much appreciated!
I’ve tried utilizing split(",") and formulamap() since I believe that has to be the key but I may not fully understand the proper syntax.
I want Row 1 to produce Apples and Bananas
Help is much appreciated!
Hey Scott!
You should split your “name” column on a blank space
That will turn your string of words into a list where each value is a distinct word.
Then you would run a combination of in() and filter to pull out apples and bananas.
Im not at my computer but guessing something like this would work:
And if your triggerWords column is just a string value you will need to first turn IT into a list with
And then use that new column as the argument for your in() formula above.
I actually just wrote a whole document on the proper use of split(). Happy to share when I’m back at my computer!
Thanks for the prompt response!
In my example, I forgot to include that some of my trigger words are “trigger phrases” which include spaces so it’s problematic to split(" ") . Considering this, what do you recommend?
I look forward to reading your document on split!
Oooh interesting!
Yeah, it gets a bit more complicated there. Can you share an updated example/dummy doc with a example words and phrases and I’ll take a look at it?
So you want to find exact matches on either of the trigger words, correct?
.Find()
in the full text is inevitable too.Ingredients.Filter(
CurrentValue.[Trigger Words].Split(",").Filter(
thisRow.Name.Lower().Find(CurrentValue) != -1
).IsNotBlank()
)
For significantly better perf you should:
Name.Lower()
a separate column in Stories and use that one in the innermost Filter. This will avoid recalculating .Lower() on each check.Trigger Words.Split(",")
a separate column on Ingredients as well. Again, will avoid splitting the value over and over on each change anywhere.For inexact matching there’s some regex magic but that’s beyond this question.
P.S.
Thanks! Works beautifully!
I appreciate the perf tips even more than the solve!
Paul for the win! Got to it before I could
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.