I am starting a new project. I have started up a new database and I have put my code into a new folder.
But when I work with my new tables, I see the tables in my previous project in the new table list.
How do I get my new project to only show the tables in my new database?
Thanks
Considering some assumptions I’ve made… the database is on the same database server and you’re using the same username and password in your new project that are also being used in your old project/old database?
Retool lists all the tables that it can access within the database resource with that user. So then create a new database user that has only access to the new database tables or schema.
Yes, the new database is on the same server, but I have now given the new database and the 2 tables a new User Name and Password.
But the old tables from the previous project still appear on the pick list.
What am I missing here?
Mike
To change what data is being displayed on a Table component, there are two places where you can change this to specify a different data set.
One would be at the query level, what Database are you using? You should be able to change the DB table name in SQL queries and GUI queries.
The second place to change the data is from the table components inspector, you can switch the data source to a different query.
If you change the query then you won't need to change this. But alternatively if you don't want to change a currently existing query, you can make a new query and set this new query as the table component's data source
Jack:
I cannot follow the steps that your are mentioning.
I have attached 2 screen captures of the environment I am working in.
The first screen shows where I am developing code for retrieving data from a server for a table on screen.
If I click the down arrow at the top I get a whole bunch of tables from my previous database. My current database has only 2 tables.
Mike
I just did some testing and it appears that queries will always display all resources(tables) that have been created for an account.
The only way to remove them from the dropdown view is to delete the Resource, which I am guessing you don't want to do since they are being used for the other app.
I can make a feature request to have an option to toggle the ability to view other resources(tables) for users that want to customize the dropdown interface.
As long as you know which table you want to use this shouldn't be a blocking problem, you can type in the name of the table you want to access and jump right to using it. You can also go to the resource page and put the resources for specific project into folders and this should change how they appear in the dropdown to make it more clear and easy to distinguish which ones are for which projects.