Select record and mark it as primary in the upper tabl

I have the following situation:

  • Table of operator/sellers users with fields such as: name, phone, email, and product.
  • Each operator can have many products so I have a table of products
  • Each product can be marked as primary or principal; here I have used a boolean to mark the field. The first problem is that more than one boolean can be marked, and I must allow only one to be marked. Another problem I have is that in the operator’s form, I must allow them to choose which will be the primary product among all the ones they have associated/assigned…

I don’t know which columns to work with for this problem, could you guide me?

I wanted to point out that Glide does not allow the inclusion of bank account information. Please stop building this out or simply use a link to their bank website so they can log in from there.

I’m sorry, did I say bank account? No, it was products

I think you can move it to be a field on the operators table. Have a choice component for them to choose the product ID to be their primary one, from the list of assigned products. That way you can make sure only one product is chosen.

Yes, but how can I make the choice component only show the products assigned to that user and not all the products existing in the database?

I think you can target source for choice component thru User’s products multiple relation.

This was the solution:

  • Operator/Seller

  • Operators products table where we add new products/CBUs related to their owner (the operator)

  • Ops Helper table where we select an operator and with that choice we can select one of their product/CBU

Why do you need a helper table though? Can’t that just be a column in the Operator/Seller table?

The helper is necessary in order to add another fields, some of then filled by A.I

So what’s your user experirence in adding/editing an Operator/Seller? Do you always use custom forms?

The operator seller CRUD in its own table:

So in my mind, what I thought the experience would look like is:

  • Operators/sellers are created by admins/logged in themselves.
  • Operators/sellers are able to create their own products, or admins will be able to assign a product to an operator/seller.
  • Operators/sellers or admins can edit the primary product ID at the operator/seller row level.

Yes, then the sale is managed by an administrator who selects the operator and the product. After that, the admin upload an image. This image is processed by the AI, which extracts some information about the sell. Then, the admin confirms or modifies the AI’s information and creates the sale.

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