I’d like to create a “tags” column, to better categorize some content.
The idea would be to search content (ie food recipes) for keywords from a list (100+ keywords) and if there is a match, either list keywords in a new column (ie “Chinese” or “Japanese”) , or (ideally) add tags to a new column (i.e. if keywords “Chinese” or “Japanese” => tag = “Asian”)
The new column can contain multiple tags
As the list is pretty heavy, I’d like to avoid if/then… rules
Using two Insert Text Column steps we can create new columns for each table called Join and insert a value of 1. This new column will eventually be used to merge the tables together.
I like to reorder the columns, but it’s a personal preference. This won’t affect your flow. We’ll now use a Combine tables step to join on the matching Join column.
Let’s create a new column called Keyword?. If a recipe contains a keyword in the same row, the value Yes will be inserted in that column. Otherwise, the value is blank.
Lastly, we can use a Filter rows to show rows that have a value of Yes in Keywords? column. The resulting table should show us a list of recipes, keywords, and tags associated with those keywords.
I even slightly improved it by adding a “merge duplicate rows’. step at the end, with a ',” delimiter to have multiple tags (if any) for one recipe.
The only limitation I see atm, is the “insert if/else column” function which is case sensitive (if keywords is “French” , and it is written “french” in the recipe, it won’t find it). Do you know any fix to this issue?
To capture case sensitivity, try using an Insert text column to duplicate the values of your Keywords column. You can then use a Change text casing step to make those keywords lowercase.
You should now have two columns with both casings for your keywords.
In your Insert if/else column settings, you can add a condition to target the lowercase keywords using the same rule that’s already in place. If your recipe has an uppercase or lowercase keyword, the Keyword? column should now populate with the value Yes.