Supabase Issue: Unable to insert foreign key relation ID

Database & APIs

Hi,
I'm new here and this is my first project with FlutterFlow, and I'm stuck here for almost a day.

So, I'm building screens where I collect user interests. I have prefilled common interests in a table called "common_interests". I'm fetching interests from here and showcasing them in a ChoiceChips for the user to select.


And this is where I'm stuck. When the user clicks on the next button, I'm creating an actions which inserts row of the user selection into another table called "userinterest_keywords". We are showcasing the interest (names) from the common_interest table in the ChoiceChips but we should be inserting their IDs into the userinterest_keywords table.

And I also think the ChoiceChips output a list of string while we should be inserting the value row after row in the userinterest_keywords table. How can we work around this?

Your guidance would be really helpful. Thanks for reading through.

What have you tried so far?
  • Referred the docs

  • Search through the community and reddit for solutions

But I haven't found the solution yet.

Did you check FlutterFlow's Documentation for this topic?
Yes
1
5 replies