I am creating an app which has to be able to have several projects for one user.
The problem is that the project has to be the copy of an existing page in which the user could/should have filled inputs which are saved within the page automatically.
I want to display the different projects in a pop-up in which the user can create a new project or keep working on one of them.
Do you have any ideas how I can create a new “page”/“project” from a copy of an existing page ?
Thank you for your time !
Hi @biminmotion - yes you can do this. I created a quick prototype at link below. Depending on how complex your projects are, you may want to use an API workflow instead to help performance. Hopefully the prototype helps you.
I’ll have a look ! My projects are quite complex… Thank you very much !
So you created a new thing (here a pop-up) and for the new thing you created new fields. The problem is that I have over 500 input or variables for each project… Do you know if I can copy a page for each new project ?
No i’m not sure how this would be done in a workflow.
@romanmg - do you know how to copy a Data Type (including the data within an specific instance of that Data Type) and create a new instance of that Data Type (with the copied data) within a workflow? Thanks!
Hey guys (@nikolai @biminmotion),
I’m going to back us up a bit because I don’t think you need copied data types. It sounds like you just need a copied Project record, where all the 500+ fields () copy their values too.
First, the Page itself should be set to Type = Project so that it can be a dynamic page and load whichever Project record you want.
A simple button on the page can then trigger the action Copy a list of things
Because there is no “Copy a single thing,” action, we’re going to use this list action and convert a single value to a list value like this:
You take the Current Page Project and use :converted to list to keep the value compatible with the action. This will create a completely cloned record in the database.
After that action you can run a “Go to Page” action to the same Project page, and data to send is the Result of Previous Step’s first item (because it’s technically a list, but we’re only giving it one item)
With that, the page will be re-loaded with the copied record, which you can modify from there.
Hope this helps, but also let me know if I completely misunderstood the goal…
Gaby | Coaching Bubble
Private coaching, courses, and tons of free resources
First of all thank you for your help !
I tried doing what you instructed me to do and it is still loading after 10 mins, might of crashed…
I still have a question regarding your solution: how will I be able to identify the projects ? Is there a way to name the copied page (converted to a list); I want the user to be able to work on the project of their choice.
Thank you for your time.
You could make a change to that new copied thing (make a change to result of copy step) and update the name field for the project.
Definitely something not right if you’re waiting 10 minutes. However, you did mention a ton of fields being involved. You may want to move this to an API workflow so that it runs on the server instead. 500 fields is a lot either way, so you may need to let your users know that there is a bit of “processing time.”
Have an API endpoint run the copy action. The endpoint should take a Project parameter, so that from the regular page, you trigger “Schedule API Workflow” action and pass the Current Page Project as the parameter value.
Yes it never loaded, so it definitely crashed.
I tried doing it with the API workflows but I had a couple problems doing that. I followed the instructions from your video (Bubble.is API Tutorial: Schedule a Workflow on a List - great videos btw). I encountered a problem when I arrived to “Copy a list” in the API workflow, they tell me I can’t use it if I have over a hundred fields :
Do you think there is a way to still achieve what I need ?
Sorry for all the questions.
Hm, the 100 item limit should apply to a list of 100 records because remember this action is looking for a list of records to copy. We’re only copying 1 item.
Is your app on a paid plan?
Oh my bad I thought it was 100 items in the list.
Yes it is!
Could you share a link to your editor and I’ll try to check it out and investigate for ya.
That would be great ! I’m on the personal plan tho it seems that I need to be on the professional plan to invite collaborators… But it seems like I can add people with emails !
If you want to send me a private message on here with temporary access, we can do that.
I sent you a private message !