Creating Entry in Database Through Workflow Is Not Saved

I enter in data to each of these fields using the workflow I setup and each time I try to save it, the data does not populate in the database. I’m following a youtube tutorial exactly, so I’m not sure what I am doing incorrectly.


That actually looks correct. How is it that you know (why do you think) that the new Customer was not created?

BTW, you don’t really need to populate “Account Owner” in this way as the Customer will be “Created by” the Current User. It’s not like it hurts, but FYI. (Of course, if some other user might create a Customer and have the option of assigning the Customer to some other User, you can ignore my observation.)

Once I click the Create Client button, the workflow is designed to create the entry, hide the popup, and reset the inputs. It hides the popup and resets the inputs, but it never creates the client. The grouping remains blank.

If you view the Customer data type in the App data tab in the editor, are you saying the data is not appearing in the database? Or is it just not appearing on the page? If it is just not appearing on the page, what is the data source of the repeating group? Also, do you have any privacy rules in place that could be getting in the way?

I am actually seeing the data in the database, it just does not appear on the page.


There are no privacy rules.
image
This is how the repeating group is setup

What is the constraint of Created-company = Current User's Company supposed to do? The Created-company field is blank, and that constraint doesn’t make sense (to me at least). Are you sure you don’t mean Created by = Current User?

It is supposed to allow multiple companies to exist on the platform and limit the viewable data of the user based on the company they are under. These are the options when I add the type. I am unable to add just Current User.

Look at my last reply again. I said maybe you want Created by = Current User, not Created-company = Current User.

The above being said, I suggest you take a step back and work through some tutorials so that you have a good understanding of the basics of Bubble and you know how to secure data with privacy rules. Trying to piece it together at this stage through forum questions and replies is not the best path to success because Bubble’s learning curve is pretty steep. In a nutshell, though, you probably want a company field on the User data type (which it looks like you have), and that field will store the company with which a user is associated. Then, a privacy rule on the Company data type of This Company is Current User's company will make sure a user can only see the data for the company they are associated with.

If I do that I need to finish the constraint with the following options. A tutorial is exactly what I’m trying to follow, but I will work through other tutorials to better understand these concepts. Thanks
image

Nah, if you click away from the dropdown, that expression will be valid without adding anything else to it… but again, I don’t think it’s what you really need.

Oh I see. That actually worked (other than identifying me as the account owner), but I will continue watching this tutorial and others so I can create exactly what I need. Thank you for your time and patience. I really appreciate it.

1 Like