How to Make DataType for App data for admin dashboard?

Can you explain to me?
I would like to make a DataType of “App Data” separate from the users’ datatypes.

This app allows users to sell items. I would like to make a DataType for an admin dashboard (hidden from users) that displays total amount of users, total combined $ of all items, how many current items, how many items in past/present, etc…

I understand how to use the data fields but how would I make a DataType that is for the entire app and separate from the users’ DataTypes?

Thank you in advance!

You can create any datatype you want and 2 ways to “hide it” from a set of users is:
1 - privacy settings (set who should see this, you can find it in searches etc)
2 - the UI, if you create a datatype that stores some admin information, then don’t put it on the page that the Users who sell stuff can navigate to

1 is important for data exposed from your application so take care to learn it

2 is important because it’s how you design the application, the button or whatever data should never appear on the screen for Seller-Users and it should only appear for Admin-Users, you can set a User-Type field on the User to make sure they can’t load the pages you have hidden for Admins

1 Like

@hi.luisacosta Thank you very much for your time and knowledge. I will give this a go. Have a rad day!

I’ll add to this - on point #2, technically if someone knew the URL they could still navigate to that page. You of course could setup a workflow that auto-forwards them to another page, but understanding that there’s a delay, and the user could still stop the page on Admin. What I have done is place the entire admin page into a group, and if user type is not ‘admin’ I hide the group. It’s not foolproof as it’s technically still visible to someone looking at the code, but from a UX standpoint it won’t look like they’ve stumbled onto a page they shouldn’t have - it’ll just be blank before it forwards. As long as the data that needs to load on this page has the proper permissions it won’t load regardless, so the security isn’t compromised.

1 Like

Great input. Thank you very much!

1 Like

no worries! Mark as solution if it helped so others can easily find the solution. Cheers

@hi.luisacosta @msgiblin
Thank you both for taking your time to type out your input/experience here.
I think I might of not been clear in my question??/

My question is how to create a single data type that will be separate from users and not created by a user.?
Meaning, I know how to make/set up datatypes and I know how to “make a new thing” with users in the workflow (such as a user makes a new “Listing datatype”)… But how do I create a LIVE datatype that isn’t created by the users in a workflow that I can link all app data too.

My question is NOT how do I hide datatype info or visuals from users… I understand all of the privacy and different pages, etc…

How do I CREATE a NEW (but only one) datatype that is not created by a user and I can link all app data/numbers to? Once again, Im not talking about setting up a datatype under your Data section.

Hopefully this makes sense to you. Thank you in advance!

Would you mind giving the context for what you’re looking to do? I’m not quite sure I follow. But just in case I do…can you make an Option set with 2 choices: Admin, and User, and then on any data being created just establish in the workflow creating the thing to choose which Option? And then in privacy rules have type Admin and only they can see /edit Type Admin, and in any RGs, just establish the rule to show things with the ‘Admin’ option if logged in user is ‘Admin’ - am I understanding this correctly?

Thank you for messaging me…

If I am not incorrect, all datatypes have to be created with a workflow?
Such as: Sign user up (creates user datatype) > User creates listing (Creates Listing Datatype)… etc…

I am wanting to create a live single datatype (we will call it App Data) that does not have to be made by every user nor workflow. There will just be a single one made so everytime a user signs ups I can include in that work flow to: Make changes to thing (App data) > field to change> User count = this app data user count +1.

I want this so I can keep track of how many current users, past users, current listing, listings over time, etc, etc… Then I make a private page and pull the data from App Data datatype and display it nicely on the private page.

Datatypes are created in your ‘data’ tab on the editor:

Here’s where you can create the datatype, and then establish the ‘columns’ of data within that type. Your workflow is for creating the ‘things’ that go inside of that table (‘datatype’)

For example, if I create a datatype of ‘car service’, within that datatype I might have other datatypes within that, like ‘Service Type’ (which may be a list of options like ‘oil change’, ‘tire rotation’, ‘Hours’ (the amount of time spent on that particular service type), customer, etc.

Once again thank you for investing your time and knowledge into this.

Yes, I 100% understand how to create and set up datatypes.

I think I must not be explaining myself correctly.

Once again, thank you for your time.

Hey, yeah it is a bit unclear as to what exactly you want. Are you familiar with backend workflows?

One way would be to manage that App Data datatype with a backend workflow. Insert that step into a workflow when you need to update the datatype with your metrics. And then you can basically make a change to that one single entry in the database (which is what I think you mean).

In other words you want to create a new table {app data} with fields such as {number of users} and then you want to update it over time. Is that closer to what you need?

I re-read your original post, and now I think I understand what you were asking - if you’re wanting to know if it’s possible to make an entirely separate table/set of data apart from what you’re already seeing / using for your users in Bubble in the app, the answer is no. Everything you do with the Admin will be inter-mingled with anything else you’ve done. It’s really just the privacy rules, established roles, etc that will keep things buttoned down.

Using backend WF is a very interesting possible solution. I will explore this.
Thank you once again. I do apologize if I did not type my question in an understandable manor.

Thank you once again for replying.
Yes, I do believer you are correct.
Just because you (app creator) creates a DataType that does not mean it exists. You simply structured a DataType. A user has to actually create a DataType via workflows.
Also, that DataType that the user just created stays with that user. You can not have one user’s data transferring over into another user’s data.

Thank you again for your time and knowledge

Ah OK I think I have it- so agreed with @twowheelsanddeals that a backend workflow would be a good way to tally totals and populate data for an admin. Another option that admittedly may be more complicated but less backend heavy is to create another step in the user workflow to add that data. For example, of a user is creating a quote totalling $120, a workflow step that adds $120 to a field under the admin datatype under total.