Delete a table safely
Deleting a table in Parsware removes its definition and its data from the environment, so the platform first checks what still depends on it. A lookup that points at the table, or an app that shows it, blocks the delete and is listed by name.

Saving a table creates it in the database straight away (what happens when you save a table). Deleting one is just as direct: its definition and every row of its data leave the environment. So before anything is removed, the platform checks what else still depends on the table, and refuses while anything does.
In 036 we made an Equipment Loan table with a lookup to Asset and put it in the Asset Tracker app. Here we delete it again. Every picture is the real product.
Try the one with dependents
In your solution, open Tables, tick a table and press Delete from environment. We started with Asset:

Nothing was deleted. The dialog lists each dependent and why it depends:
- a lookup field on another table that points at this one, because deleting the table would leave that field pointing at nothing;
- an app with the table in its navigation, because the app would have a page with no table behind it.
The list is by logical name, the name every other component uses to refer to it.
Remove what depends on it
Equipment Loan has only one dependent, the app:

Open Apps, edit Asset Tracker, and press Remove beside Equipment Loan in its navigation group. Save the app, then go back to Tables and try again.
Confirm
With nothing depending on it, the platform asks once more, and says exactly what will go:

"From Main and every solution" matters: a table created in this environment is removed from the environment, not just from the solution you happen to have open. Its database table is dropped with it. The Tables list no longer has it:

What the check looks for
Before a table is deleted, the platform looks for three kinds of thing that would be left pointing at nothing:
| Dependent | Why it blocks | How to clear it |
|---|---|---|
| A lookup field on another table that points at this one | Its foreign key would point at a table that is gone | Delete the field, or point a new field elsewhere |
| A lookup to several tables that lists this one | Its records would hold references to a table that is gone, and its search would offer an empty tab | Make a new field without this table, or delete the field |
| An app with the table anywhere in its navigation | The app would have a page, perhaps its home page, with nothing behind it | Remove the table from the app's navigation |
Lookups on the table itself don't block, because they go with it. A parent field in a category tree points at its own table, and disappears in the same delete.
The check reads every app's navigation, not only the page an app opens on, so a table listed in the third group of a large app is found just as surely as one on the home page.
What goes with the table
Once nothing depends on it, the delete removes everything the table owns, in this environment:
- The database table, with every row in it.
- Its fields, forms and views, and every relationship to or from it.
- Its files. Small files kept with records go with the rows, and large files that went to object storage are removed under the table's part of the store. Large files: where they go explains why that is one delete.
- Its place in every solution. The table is removed from Main and from every solution that listed it, because it no longer exists to be listed.
What it doesn't touch is anything outside the table: other tables, the records in them, and the
environment's other apps. If a business rule on another table read from this one with getRecord or a
query, that rule now finds nothing; check rules that name the table before you delete it.
Before you delete: a checklist
Deleting is permanent, so a minute of looking first is cheap.
- Is this the right environment? Check the environment in the top bar. In Development, deleting is routine. Anywhere else, a table should leave by uninstalling its solution, as below.
- Is anything in it worth keeping? Open a view of the table. If any of its records still matter, move them somewhere else first: there is no undo and no recycle bin.
- Does anything else use it? The platform checks lookups and apps for you. Rules, processes and reports that read the table by name are yours to check.
- Would retiring be enough? If the table might be wanted again, take it out of the app's navigation and leave it. People stop seeing it, and nothing is lost.
Deleting tables that depend on each other
When several tables point at each other, delete them in the order the arrows point back: the table that points at others first, then the tables it pointed at. To remove Equipment Loan and Asset together:
- Remove both from every app's navigation.
- Delete Equipment Loan. It points at Asset, but nothing points at it.
- Delete Asset. The lookup that pointed at it went with Equipment Loan, so nothing points at it now.
Trying it the other way round is harmless: the platform refuses to delete Asset while Equipment Loan still points at it, and the message names the lookup.
In Test and Production: uninstall instead
A table that arrived in an environment through a managed solution has no definition of its own there to delete, which is why the platform refuses with comes from a managed solution and cannot be deleted directly. The right way to remove it is to remove the solution's contribution:
- Ship a version without it. Delete the table in Development, raise the solution's version, export and import. The upgrade retires the old version, and anything the new version no longer carries, the table included, is removed. Moving work from Dev to Test to Prod walks through an upgrade.
- Uninstall the whole solution, when the application is going away. Every component it brought is removed, and anything it only extended goes back to how it was. Managed layers and clean uninstalls explains.
Either way the change is reviewed in Development and arrives the same in every environment, rather than somebody deleting tables by hand in Production and hoping the next import agrees.
Standard tables
The tables every environment is created with, such as Account and Contact, are usually depended on by almost everything, and an app or a lookup somewhere nearly always points at them. If one of your solutions only added fields to a standard table, uninstalling the solution takes those fields away and leaves the table as it was. That is nearly always what you want instead of deleting the table itself.
Two things that aren't this
Taking a table out of one solution is a different, harmless action. Inside a solution other than Main, removing a table from the solution's contents only changes what that solution carries; the table and its data stay in the environment.
A table from a managed solution can't be deleted here at all, because it has no definition of its own in this environment. The platform says so. To remove it, uninstall the managed solution that brought it, which is how every environment after development should lose a table: by importing or uninstalling the solution, never by hand.
Next: the end user's side, starting with signing in and opening an app.