Select to filter data for a number column inside a collection using a number column from another table

Hi guys,

how can I filter a number column from a collection by comparing it to another number column from a different table ?

I see that when we choose other text columns in the filter data section, the option to select other tables and their columns is available, for number entries only the columns from the current table are available.

Also, because the source for the view is in another table, I can’t add the value to the table I use for the collection.

It will be great if we would have the possibility also for number entries to compare them with data from other tables.

So, any suggestions ?

Thanks.

Another option I see is to pass the value to the desired table in another column, but it doesn’t take it as a number and I can’t compare it

Really? I don’t think so. Can you show me evidence of that?

Generally, when applying filters to collections, you should have options to compare columns to:

  • other columns in the same table (the source) of the collection
  • User Profile columns (if User Profiles are configured)
  • screen columns (columns in the table the parent screen is attached to)

So if you want to filter against a column value from some other table, then you need to temporarily copy that value into a computed column in one of those 3 locations listed above.

The way you do this depends on your exact use case, but it often involves an action that sets a user specific value somewhere, which in turn gets picked up by a single value column.

1 Like

@Darren_Murphy Sorry for the late response … try the approach from the image below and where it’s 0, try to see if you can compare it to a value in another column … For me it’s not working.

the main reason for this is the following

  • if you have some data added by the user that is stored in another table … like a " filter table " with one row, where all the input’s are stored, and you have another list you are displaying that can be filtered based on their data, you would want to quickly filter the data in the list based on the input you have from the user. … hope it makes sense .

Now, as a workaround, you can add all the columns in the user’s table, but it will be great if also, we could compare it with values from another table. Thanks.

I’m not sure that I’m following. To me, it makes no sense to be able to compare to a value in another table, because that table could contain several rows. How would Glide know which row in the table to compare the value to?

If you are using some other table to temporarily store your filter conditions, then the way to apply those filter conditions to your data table is to add one or more single value columns. And then either use those with some if-then-else logic, or use them directly in the Collection filter.

1 Like