Trouble sorting based on db value

I have a table for the company and in that table, I have a relationship to another table for work trades

I have an appointment builder and want to show all company and all work that are compatible.

when i go to the db i can see each company and the work they do, but when i try to filter its not an option?

I need to have trades visible?

So it will show all jobs available to the selected company. what am i missing?

Any idea what im doing wrong? seams like i should have access to all records in a db table even the relational ones?

What kind of a relationship is it?

The relationship with company and trade is a m2m

Any idea? why can i not acces that information?

I have a hunch it’s because the relationship is not right but I will have to investigate further when I get a chance. I will get back to you with some answers as soon as I can :slight_smile:

Hey @rjp, tbh your setup of the data tables is quite confusing… But this is how I envision you can possbily implement your idea.

Correct me if I’m wrong, but the top level is a list of companies that you want clients (logged in users) to see.

So the first thing the user sees should be a list of companies.

When they tap into a company, they should see the work items and trades available (looks like 2 separate data collections) for ordering from that specific company.

You’ll need to create a 1-to-many relationships (company to many work items, company to many trades).

Beside each work item or trade, you can add a “BOOK” or “ORDER” button, which leads to a form. The form will have pre-filled details of the specific work item or trade that the user selected. For eg. notes, company name, price, etc.

The user will then have to key in their name, address, phone, email, and contact so that the company he/she wants to hire can contact them back.

Upon submission of the form, you can either create an order (which requires another data collection, 1 to many relationship again: 1 work item or trade to many orders) in a separate data collection that the companies can then access via the app, or you can send an email (requires custom action available only on the paid plan) using Sendinblue or SendGrid.

Hope this helps!

1 Like

Thanks for helping out with that @vancewong!

@rjp Does this solve the problem? If not, let us know so we can help further!

1 Like

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.