i am new to bubble and try to understand the database. But there is on thing that does not work for me.
I have two entries in the Database User and Cars.
The User has a Field with the Name Cars and it is the fieldtype Cars.
On the other side Cars has a field Owner and the type is User.
I have built a little form to insert cars. When i push the button i create a new thing in Cars. it shows the Owner like it should.
But in my User database the field Cars stays empty and i have no clue to set it up?
Should not be the unique Cars id there?
Hope you understand my Problem.
Thanks for your help.
Also, I recommend you label your Cars data type to singlar “Car” without the S. Think of the set up for a data type as representing 1 record. It’ll help you understand what you’re working with when you’re reading it in your app so you don’t get confused between 1 or multiple Car records. Bubble will pluralize it for you whenever necessary (e.g. “Search for Cars” vs “Search for Carss”)
You can also use “Make a change to Thing” like you would for any other data type (not list, just Thing) and enter in “Current User” and it’s the exact same thing. Bubble just gives you a shortcut to modify current user, so now you know both ways!
So that you are obviously an expert here.
I have maybe a more advanced question.
When a user logs in i write with the login button LAST LOGIN (current ate & time) in the database of the user. Can i now trigger an Email e.g. after 10 days when this user has not logged in in those 10 days?
Can you recommend bubble? Of course you can build crazy things without coding but i that the pages which are hosted be bubble are loading relativ slow to other hoster.
Can you agree with that?
Create a date field under the User so that every time they log in it saves the current date/time to that date field for the current user. Within that same workflow, you can schedule an API Workflow for current date/time +(days): 10. Have that API Workflow send the email. Make sure to send the following parameters:
Current user (to know the email address to send to, user’s name for the email, and that last login date if you want to reference it in the email, etc.)
The last login date that you saved to the current user as a separate date parameter because you’ll want to add a condition to the endpoint to only run if the user’s last login date is still 10 days ago… you don’t want the email to go out if maybe 4 days from now he has logged in and this email is like “you haven’t been here in 10 days”. So the condition on the endpoint would be “only when user [parameter]'s last login is date [parameter]”. As long as the saved last login date matches the date passed in the parameter, then the user can receive the email.
You can also cancel any previous scheduled workflows every time the user logs in, but it’s a few more steps to save the ID and actions to update everything… you can do it, just a little more work.
I highly recommend Bubble for a lot of things. I have no idea what you’re building though, so I can’t say if it’s right or wrong for you specifically. With performance, keep in mind that it’s not all on Bubble - you have a lot of responsibility to structure your database and search queries efficiently. Even how you set up repeating groups on a page contribute to speed a lot… you don’t want to have 200 items load as soon as the page loads, for example.
I’m more than happy to walk you through important concepts in a coaching session if you’re interested (in my signature above somewhere). Otherwise, definitely keep using this forum. It’s a wealth of information. I also have a bunch of free resources on my site (videos, email newsletter, etc.)