Forum Academy Marketplace Showcase Pricing Features

Create Data Type Through App

I know I can go into the data tab and manually create a new data type, but is it possible to do so through the front-facing app?

Consider a text input field with a button. When the button is clicked, a new data type is created in the database and its title/name matches the text inputs value. I’m also wondering if something similar could be done to create new data fields.

Thoughts?

You can’t create data types through the workflow, but perhaps there is a similar way to do this if you’re looking to have various text inputs saved. What are you trying to allow a User to do/create?

I’ve been trying to do this too. Did you figure it out?

You could do it by having a table which holds you user defined table entries.

I don’t think I quite follow. It seems like the workflow will only allow you to create a new type from the backend.

I have a thing called Campaigns with several fields, one of which is called “Title”. Each campaign however, also needs to be its own thing. So I would like to ‘create a new thing’ and when it asks me for the new type name, I would like to pick from the titles in my campaign thing. Is that possible?

What’s the use case here for an end user? You’ll have better luck soliciting help if you can outline what a user needs to accomplish, then folks can help you work backwards to Bubble technical implementation options.

I don’t think you need a new data type for every campaign, but w/o more color on the user’s workflow it’s difficult to advise.

okay:

There are several campaigns. An admin assigns a specific campaign to each user. Each campaign has activities that the user has to complete and of course the activity instructions. A user can have multiple on-going campaigns at any given time. Each campaign needs to also be its own thing for the user submissions and so that I can show each user’s progress for that particular thing.

example: “Play Ball is both a campaign and its own thing”

I previously had the submissions all as list fields under campaigns however it made it impossible to measure each user’s progress for that specific campaign and I couldn’t tell which user had submitted what.

I have included a link to the app, I don’t know if you will be able to make any sense of it right now because I am currently editing and trying different things.


https://bubble.io/page?
type=page&name=dashboard_campaigns&version=test&id=yyyyyyyy&tab=tabs-1

I’m unable to get into the editor. But I think you may want to rethink your data structure. I’d create a separate data type for each main thing, and use reference fields (not lists) to enable linking between data types. Will try to mock this out and send you a link.

thank you, I’d appreciate that

What is a “user submission” in your app? Just text feedback on how they did on the activity? And “user progress” I assume means, for example, “Jane has completed 4 out of the 5 activities for the Play Ball campaign”?

To make sure I understand, is this the essence:
Admins can create Campaigns
A Campaign contains a fixed set of default Activities (as many or as few as the admin wants to define)
Each Activity has instructions (and other properties), and is associated with a single Campaign.
Users are assigned one or more Campaigns.
Users must complete the Activities associated with each assigned Campaign.
To complete an Activity, a user must make a “Submission” (eg input some text about what they did for the given activity).

Does that capture it?

yes that’s right. for 3 of the activities submissions are images, the other 2 are text

are you “baking in” campaigns and activities by providing default data, or in your ideal case are these created on the fly by admins? I sign up, create a campaign, call it whatever I like, define some activities, etc…

Exactly, admins sign in, create the campaigns etc, then assign them to users.

Sent you a PM with link to sandbox app. Let me know what you think…