Data Type “User” has:
“Account Type” Option Set.
“Company” Data Type
An Admin creates an account, so a user with Account Type (Option Set) Admin.
He then has the option to create a Company (Data Type).
So in the workflows this is “create a new thing: company”.
When the Admin does this, the company gets created, but in the App Data, the Company field is empty for the User and the user is not in the Company.
I need to manually connect them both ways.
Why is this?
How can I solve this?
After this the Admin can create “Employee” users, they also need to be connected automatically to the same company.
So this works, the company is asigned to the admin.
But because I want to know who the Admins of a company are, i created “Admins” under “Company” as a “list of users”.
How do I automatically fill in this field now in App Data?
So the Admin that created the company for example also is in this list.
When you create the company, add the current user to the Admin field.
By the way, just some friendly advice here… what you are trying to do is about as basic as it gets in Bubble, so you might want to consider taking a step back and working through the tutorials and watching the academy videos. Bubble’s learning curve is steep, and without a good understanding of the basics, you are really going to struggle to get up that curve.