Need help with comparing references between two tables and updating a field

Hello everyone,

I hope you’re all doing well. I’m reaching out today because I’m facing a challenge with my Bubble app and I could really use some guidance.

I recently imported a CSV Excel file into two separate tables within my Bubble database. The first table, “Produit,” contains a field named “Reference,” while the second table, “Famille,” also has a “Reference” field.

My goal is to compare each reference in the “Produit” table with every reference in the “Famille” table. Specifically, I want to check if the first 6 characters of a reference in the “Produit” table match the first 6 characters of any reference in the “Famille” table. If they do, I need to update the “Famille” field in the “Produit” table with the corresponding family.

I’ve been trying to create a backend workflow to loop through the “Produit” table, compare the references, and update the “Famille” field when a match is found, but I’m struggling to implement this successfully.

Could anyone provide guidance on how to achieve this? Any help or insights would be greatly appreciated.

Thank you so much for your assistance.

Best regards,
Kenton