Does changing a column type lead to disappearing layout?

Hi there. I had a working layout (orders list view) of an inventory app based on the “Inventory” by Glide template. I had customized it to look like this:

Then, I changed the “Type of Order” column from the text fields (Sale/Restock) to a Relation type since I wanted to define a more robust transaction type model in a separate sheet. Suddenly, my Orders collection layout has disappeared :frowning:. The Order list, detail, edit and create views that I had painstakingly customized have disappeared :disappointed:.

I can’t seem to find a way to revert to the old version ATM, no version history in Glide AFAIK.

Is this common Glide behavior or might it be a bug?

FWIW, I came across Layout disappears when you reselect a tab's source sheet and thought it might be related.

Possibly you changed the source of your tab instead of the source a single component.

A safe way to make changes is to first duplicate your tab you intend to work on.

To undo changes made to your app you could use the undo :leftwards_arrow_with_hook: button in the bottom left of the editor. You could also use ctrl+z or Apple+z to undo recent changes.

Unfortunately if you closed or reloaded the editor you can no longer undo recent changes.

1 Like

I am quite certain I did not change the data source of the tab. But that’s a good insight on duplicating the tab before making potentially breaking changes. Version management in Glide ought to come sooner!

I think this might have broken things. Do you mean that you change from using a text column to a relation column? If yes, does that column power more things further down the stream?

I will temporarily unmark Eric’s answer as the solution to talk more about this.

Doing that will have broken the below filter condition. Quite possibly all you need to do is fix that.

Thanks @ThinhDinh, worth exploring the underlying issue.

Yes, I changed from using a text column (that had values “Sale” or “Restock”) to a relation column referencing another table that defines transaction types (“in” and “out” values) and sub-types:

  1. “in” types include these subtypes: “restock”, “return”
  2. “out” types include these subtypes: “walk-in sale”, “in-store pickup”, and “online sale (delivery)”

I wanted it such that in the create/edit form of an order, the user must interact with 2 fields:

  1. Select the order type (into or out of store)
  2. Select the order sub-type (depending on step 1)

@Darren_Murphy fair observation, and that surely would’ve been a short-n-sweet fix but here is the thing:

  1. The Collection component disappeared in the layout editor altogether (see my 3rd screenshot above). So the preview screen would’ve been blank, but at least I should have been able to see the collection component.
  2. When I used “Find uses” on the new relation column (and its derived lookup fields e.g Transaction Type/Name), it would show the ‘raw’ order edit/create/view screens (that is, the Glide layout editor couldn’t surface my previously-customized screens, instead showing the generic ones based out of the table)

Just one further observation. It’s not actually possible to change a Text type column to a Relation type column (or any computed column type for that matter), so you can’t have done that. I assume that you instead created a new column and gave it the same name?

1 Like

You’re right, I did not rename the text column. Instead, I created a new column (of Relation type) and then replaced the references of the old (text) column with the new column (relation and its derivatives), then deleted the old column.

Somehow, one of those steps caused the custom layouts that I previously had to disappear :thinking:

Okay, just two more points:

  • Firstly, I still question that filter. If “Type of Order” is a relation column, then “Type of Order is Sale” makes no sense and would not match anything. Relation columns can only ever be “empty” or “not empty”. They will never match a specific value.
  • Secondly, in your second screenshot I see two Orders tabs. But in your third screenshot there is only one. What happened to the extra Orders tab?
1 Like

If “Type of Order” is a relation column, then “Type of Order is Sale” makes no sense and would not match anything

I agree, no orders data would have been shown. My problem was that the actual collection component was no longer being shown under the “COMPONENTS” section of the Layout Editor.

What happened to the extra Orders tab?

That second orders tab was a duplicate that I used to counter-check my customizations last week. I later deleted it after I was done with the changes

I think under normal circumstances, the only time you might see components disappear from a screen would be if you changed the source table of a tab.

1 Like

I still wonder about this. Is it actually a lookup column? You can never get “Type of Order is Sale” if “Type of Order” is a relation.

1 Like