How do I use "allow to create option" on Multiselect dynamically

Hello,

I’m in the middle of building a web to CRUD databases with using data-grid.

I was able to display, create, edit and delete thanks to all the amazing tutorials out there,
but I ran into some roadblocks now.

First, let me explain about database structure I have.

I have Needs table and Need_types table on Supabase.
Needs table has a need_type_id as a foreign key.

When a user wants to create new need item with the form container below , they might want to create a new need_type as well.

It seems like I would be able to achieve that by using “Allow to create option” from Multi-select but I’m not sure how I can bind things correctly.

now, I want to achieve the following:

  1. Insert a new type on Need_type table from Supabase when a user creates the one on the multi-select on the form container.

  2. Create new need on Needs table from Supabase with using the newly created type’s id once it’s submitted.

Please let me know if you need more additional explanation to help.
Thanks in advance for all your help!

Attaching a screenshot below:

Hi @Coder :wave:

If there’s no sensitive data in your backend, would you mind recording a short video walking us through the use case and how things are currently setup in both WeWeb and Supabase?

It’ll help me reproduce your use case on my side and hopefully figure out a solution for you.

If that’s not possible, could you send me a link to your WeWeb project with credentials so that I can access the Supabase data in the collections as well if those are protected by authentication?

hi @Joyce,

My team found another way to figure that out.

Thank you so much for the reply.

1 Like