I am building a two sided market place and wanted to get some tips on how to get unstuck with the following. I want to allow the sellers to input the name of their service(s) and the associated price. What would be the best approach for this? I was going to build a list of the names of the service and list with the price but I am having trouble getting my list save to the database. Any tips or advice would be helpful. Thank you in advance
Hello One way to set this up would be to create a new data type called “Service”. Within the Service data type could be two fields: “Name of Service” (Type: Text, List: No), and “Price” (Type: Text, List: No).
Then you can create a field within the User data type called “List of Services” (Type: Service, List: Yes).
This way, a User can create a new Service with inputs (Input Name of Service, Input Price of Service) and click ‘Add’. When the Add button is clicked, the workflow could be:
Data --> Create a New Thing --> Thing: Service, Fields to Change: [Name of Service = Input Name of Service’s value] and [Price = Input Price of Service’s value].
Then create a second action in the workflow which adds that Service to the User’s List of Services. The workflow could be:
Data --> Make Changes to a Thing --> Thing to Change: Current User --> Field to change: List of Services add (Result of Step 1… Create a New Service).
I have been taking more of a relational database approach to this - I would have a join table as suggested by @fayewatson but add a field for the seller to that. In this way, there’s no need to have a workflow add the item to the List of Services.
Comping from a database background this seems a better structure and easier to maintain and understand - I would be interested in feedback from others about this.
I am also interested in this thread because I am in a similar situation so I appreciate you asking that shadsanders89.
The next step is how do we calculate the costs of goods or services provided by vendor so that we can then create and process the transaction? and also incorporate a calendar for the user to select times and days the vendor has in available, etc…
I am having a little bit of trouble with the second part. I am trying to take my list of services and put them into a list in the User table but no luck. Here is what my screen for this task looks
Ok great, for the Services that a User can provide, do you want every User to have 5 services or can some Users have less than 5 or some have more than 5?
In the above screenshot, each Service has a creator (a User), the Name of the Service, the Barber Shop where the Service is offered and the Price of the Service. Instead of storing the Barber Shop’s information within fields in the User, it’s its own data type because at some point your app may have more than one User linked to a Barber Shop. The Barber Shop data type looks like this:
I don’t want to make things super confusing with too many screenshots, or delete anything without you seeing what happened. So feel free to go through these and see the differences in the data structure; I labeled the fields that you won’t need anymore with “(to delete)”. Once that step is done I’ll be happy to help you set up the workflows to create a Service, and have them ‘linked’ to a Barbershop and a User.
Awesome! There are lots of helpful posts throughout the forum about structuring/querying data. I’m still learning the more efficient ways as well, but can try to assist if you get stuck at all.