Duplicating a list?

TonyBenedetti

Hobbyist Programmer & Fabrik Fan
Rob/Cheesegrits ... a few years ago I was working on a project which I abandoned/neglected all this while because "real life" got in the way --- I'm just a hobbyist programmer (although I wrote code for a living at IBM for 35 years before "retiring"). Back in January 2011, I asked a question (http://fabrikar.com/forums/showthread.php?t=19928) about duplicating a list (back then it was called a "table" in Fabrik).
Is there a way to duplicate a table/group/elements set (includng the underlying MySQL table)?

What I would like to do is create a table with a bunch of common elements (e.g., Title, Source, Date Created, Date Modified, ...) and then use that as the basis for other tables that share those common elements. I tried to use the Tables/Copy route, but it seems to have created just the Fabrik stuff and not the MySQL stuff. I suppose I could do it element-by-element, but I have a slew of common fields and a bunch of tables to set up with those common fields. ...
Felikcat kindly gave me a solution that worked (and worked well) ... but now I have some time on my hands and wondered if it would be worth my while working up a more permanent solution for the Fabrik community.

I was thinking about a new button on the "Lists" toolbar that would "Clone" (or "Duplicate" or "Replicate" or...) the entire definition of a list ... including the List itself, the associated Group(s) & Element(s) as well as a new MySQL table?

It could be used for folks like me to set up a "skeleton" for a list that could be amended for each actual list (and it's underlying MySQL table).

All of the code is in Fabrik already to replicate the list/group/element set as well as to create a new MySQL table. I think it would be fairly(?) easy to marry up the functionality.

Does this sound like something useful to other folks? Would it fit into Fabrik's philosophy? Would it be better to leave it to you guys or should I give it a crack?

I await your counsel,
Tony Benedetti
 
hi Tony

Sounds completely reasonable, considering the workload we have at the moment though Hugh and myself wouldn't really have the time to implement it, so if you want to have a go at doing it that would be fantastic.

Best thing to do would be to use github - fork the code, create a new local branch for the work and then when you are happy with it instigate a pull request from your github fork to our main repository. That way you can keep the dev work separate from any other changes we add and we can then easily review the pull request code
 
Rob, again some "real life" matters got in the way of my working on my Fabrik projects. I've just returned and find that I've forgotten what little I knew about Git and Github. My repository is so far out-of-date that I can't make sense of it .. so I'm going to start over and re-fork Fabrik. I noticed that you were the only soul to follow my repo so I wanted to give you a heads-up that I'm going to blow away my TonyBenedetti/fabrik_replicate and try again ... this time with Fabrik/fabrik as a remote so that I can keep up with the changes you good folks are crafting. Keep going ... I'll catch up.

Tony Benedetti
 
We are in need of some funding.
More details.

Thank you.

Members online

No members online now.
Back
Top