My Bubble projects contains an online collaboration platform, which lists users (ofcourse). Each user has a profile, which also contains it’s educational background. Let’s say, I have John Smith and John attended Harvard University.
So, when John add’s his University Degree, the workflow contains --> Add a new thing, type: university (which contains place, degree, etcetera). For all this goes well, except when David Smith joins my platform and David also attended Harvard, I get 2x Harvard University in my database:(…
So, I already changed the workflow to " make changes to a thing: Current users education, and I’ve replaced the input form with a search form (so when a user start typing Harvard it will automatically shows the already available Harvard University in the database).,.
I’m not sure what the issue is, because it sounds like you already solved it
I’m guessing that maybe you saved the education as a text field, but you want to change it to a Thing called University, which contains Harvard/Stanford etc? That way, the University will be “linked” to the user’s account, which makes sense from a database perspective.
I really would like, but the copy-paste (page) and/or “copy with workflows” don’t work, since the database isn’t copied also? So, after copying I receive 400+ errors…
So, maybe it’s an idea to create a new element called “User_education”, which contains “user” and “education”, and that In the element Education I will add the necessary details… ?
Don’t know if that’s the best to set this up, but I need to figure out a workflow that either links a user (like David Smith) to an already exisiting education, and if this education doesn’t already exists, it should be created.
For the latter I used the function “allow items which are not on the list” in the search.
You mean by creating the user_education table? Also, the constraints you mentioned are part of the “Create a new thing workflow”. But that’s only applicable when the added Education isn’t already part of the database, because when the Education is already available in the databse, a copy will be added, and then I am back at my first issue of this topic
I hope I’m following you correctly, but yes, so in order to prevent a copy from being created you’d add a condition to the Create action: “only when search box’s value is not empty”. Therefore, for the Make a Change action, you’d have the opposite condition - only one would ever be true.
Alternatively, the conditions can be placed at the event level so that you have 2 separate events for each scenario (existing Education or non-existing) - to keep things clearly separate as opposed to managing a bunch of conditional actions under a single event.
Ok, I’m still having trouble with making the connection, since I don’ completely understand how to structure many to many relations ( Are many-to-many relations supported?), in combination with a profile page which shows most data by the variabe" Created by the current user" …
So, the idea is that (e.g. just like Linkedin), a company and/or education is added by a user and then is stored in the database.
Also, when using the search button for adding a company/education (instead of input), I cannot create 2 separate workflows (as @romanmg mentions), since I’ve enabled ’ also allow items not in the list" in order to ensure that the user can always type in something.
Hi @hawkeye84, don’t give up! Could you share your editor link? I’d be more than happy to take a look at how things are set up currently and see what needs to be adjusted. We can definitely achieve what you’re describing. I’ve done it many times before with others.
I’m trying to understand this - can you confirm if I have this right?
a. If user searches for Harvard and it’s value is not empty (so it found something’) then do this…
b. If user searches for Harvard (and it doesn’t find anything so User types it in) then it’s typed text is not empty and do this instead…
The parts in bold are put in the Only When condition on the workflow Submit button event and have different actions as a result.