This topic is locked

Duplicate Views in Table Editor

1/13/2011 3:27:29 PM
PHPRunner General questions
V
Vienna author

Admittedly I have not been working with PHPRunner long, a few weeks-- but I am discovering for my project that when I create a Custom View in the Tables Editor that I only have one option (unless there is a hidden way to do this)--
Custom View seems to only allow making a new View based on an existing table. I understand the logic, of course, except that PHPRunner invites the designer to think of Custom Views the same way as tables. Custom Views are named and stored below Tables. Custom Views show up in the Visual editor and they are treated as physical tables. They create SQL statements which can be edited and automatically show up as separate pages just as database tables do.
Therefore, why can't I right-click on a Custom View either in the lefthand list or on the visual representation of it and when my choice is "Add/Create Custom View" why does it ONLY ask for one of the Tables as the basis of Building it?
In other words, I spent some time creating a Custom View, why can't I duplicate it as an option, basing my new Custom View on an EXISTING Custom View? Then name the Duplicate something else, go into the SQL editor, and modify it slightly to use it for a smilar but different result that will be another Tab after a user or admin logs in?
My workaround at the moment is kind of clumsy, but works:
I take an existing SQL string for a Custom View, such as "Custom View 1" and Copy it.

Then I create a new Custom View, "Custom View 2", having to pick some table to base it on in the meantime.

Once the new Custom View 2 is created I have to go back to the SQL editor and overwrite that SQL with the Custom View 1 SQL string.

Then if Custom View 1 has a conditional "... where user_id = 1" I change the Custom View 2 SQL conditonal to "...where user_id = 9"
Or whatever suits the needed output for Custom View 2
But, it would be much easier, especially for multiple situations where I want to BASE many Custom Views on the same "template", so to speak, if "Add/Create Custom View" allowed the PHPRunner designer the choice of either

1 >> a table or

2 >> another already created Custom View to use to build the next Custom View.
It would seem to me that some sort of question like this has come into this forum before, since it is such a basic building block.
Thanks for your kind response.

Sergey Kornilov admin 1/14/2011

This is a good feature and we have added it to suggestions list.
Meanwhile you can use your main table as a template. When you create a custom view all settings are copied from the main table which will do the same job for you.