New to Bubble, but I am trying to create a workflow for a user when adding content to a post, to first check if the post exists, or if it needs to be created.
For example, I have tables for color, material, and cost (just making this all up). But if I wanted to have the ability to add a review to a given item (unique color + material + cost), and I wanted to have this check be part of the add review flow, is that doable in Bubble?
I.e: I want to add a review for a $2.99 blue plastic item (I understand this doesn’t make real world sense), but first I’d need to create this item, and then be able to add a review. That’s what I am curious about seeing how to check if this exists first or not.
TIA!
More context: I do want to keep the tables separate as they have more fields related to them (i.e. color has 4-5 fields, material does too, etc.), and to allow for other ways/means for users to search.
You can create a new table say “ReviewCheck”, add color, material, and cost as fields in that table. You can also add another field, a list of reviews. In this way, you can check Do a search for ReviewCheck with constraints of color, material, and cost. If the :count is zero, that means you will need to Create a New Thing of ReviewCheck with the appropriate fields, and add the review to the list of reviews. If the :count is 1, then you can Modify the :firstitem of that search (Thing of type ReviewCheck) to just add the review to the list of reviews.
You can alternatively (or additionally) store the ReviewCheck in the review.
These are just some ways, there are others as well.
Thank you for this! I get the concept, but I am not sure where/how to run the Do a search and add in the constraints. I have a form where the user selects each of the three (or adds them in if they don’t exist) – after filling these out, this feels like the right time to check to see if this exact setup exists already. However, I am not sure how to ‘check’ this — I have a button which can trigger a workflow, but I can only see how to add a new thing/update an existing one VS check if this exists yet or not.
Send me a read-only link to your Bubble app and I can help. If the drop-downs can only be selected sequentially, you can trigger the workflow when the value of the last drop-down changes. If not sequential, you will probably need to add a button to trigger the check. It can just be a part of the “submit review” workflow