Add recipes who's keywords match with user's goals

I’m trying to add recipes to a user’s account by matching a list of user’s “goals” to recipe keywords. I can add them if I use :first item or specify the number. But I can’t get the :from # to work. What am I missing?

In other words

  1. For each [user’s health goal]
  2. Search [recipe keywords]
  3. IF [user’s health goal] === [recipe keywords]
  4. Save [recipe] to [user’s recipes]

I’m happy to clarify if needed

Hi Andrew, and welcome to the Bubble forum!

Do you mean that if any User goal is in a Recipe’s list of keywords, that Recipe should be saved on the User?

Best, Peter

Yes that’s right. I’m comparing two arrays. IF any word the user’s list matches any keyword in a recipe then that recipe needs to be added to the user’s account

It looks like it’s comparing list to list instead of iterating through each value in the list

@andrewbobstevens did you find a solution about your issue ? I am in the same case, and I don’t know how to get the list of match when a keyword is found in the initial list.

I hope you can help me :wink: Have a good day

@guillaume2 I didn’t find a great solution. I ended up adding the list of recipes (as shown above) for every keyword. I only had a dozen or so keywords. So not a great solution but it worked for the most part.

If you find something better please let me know!