Can't select template column as a "Row" in "Single value" column. Bug or a feature?

My App/Pages Support link:
https://go.glideapps.com/support/5a3da9ad-8532-43e6-8661-a308b69c721f

Describe the bug:
I have a template column that populates a number from a column in the user’s profile (pretty much per Miracle method), but when I’m trying to use that template column as a “Row” value for “Single value column,” Glide resets it to the previously selected column. In the demo below previously selected column and template column have the same values (essentially looking at the same column elsewhere), but the same thing happens – it resets to the previous value. Not sure if it’s a bug or it’s expected behavior (I’m guessing that “Row” value needs to be a number, and it doesn’t recognize it as a number because it goes through multiple places until it gets here?)

Expected Behaviour:
The “Row” value in the “Single value” column settings should set to the template column.

How to replicate:

  • Edit select_var1 column
  • Select template_size_selected as a value in the “Row” dropdown
  • Click done
  • If you try to edit select_var1 column again, it resets to the previous value (lookup_size_index)

Demonstration:
CleanShot 2022-03-22 at 18.49.01

I think what you are seeing is correct and expected behaviour.

A template by definition is always going to return a string, even if it looks like a number. And a Single Value column expects a number, as you guessed.

If your template returns something that looks like a number and you want to use that in a Single Value column, then what you could do is first pass the template through a Math column. You don’t need a formula, just a single replacement. This should return a number, which you can then use in your Single Value column.

I haven’t actually tried the above, but I’m fairly confident it will work.

2 Likes

Interesting! I had a feeling that’s the case but wanted to make sure :slight_smile: thank you for the clarification.

I’m not against keeping the current thing going:

  • I have a template column that returns the pattern_id
  • I create a relation with that pattern using pattern_id
  • The index I’m looking for is a column in patterns, so I use lookup to bring it here.

It works fine but that’s 3 columns instead of one. Was trying to be economical :slight_smile:

Closing due to inactivity. This topic will be deleted in a few weeks if there are no more comments.