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
- For each [user’s health goal]
- Search [recipe keywords]
- IF [user’s health goal] === [recipe keywords]
- 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?
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 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!