Something I’ve noticed about filter/visibility conditions on lookup columns:
Relation columns relate two sheets based on matching criteria within rows of selected columns from each. Then lookup columns lookup data from one column of that relation. If that lookup column is a Template or If-Then-Else column, any empty rows of data from any instances of that lookup column will NOT be recognized as empty. They will be recognized as empty placeholders… which the visibility/filter conditions do not recognize as empty. So using a Template or If-Then-Else column to create conditions of visibility or filtering will not work. On the other hand, if the lookup column is just a regular sheet column, any empty rows will be empty and you can create all sorts of powerful conditions using lookup columns.
The problem, of course, is that using sheets columns for lookup columns adds a lag to your conditions since you have to wait for your sheet to update. I’ve noticed this for a while. Anyone else?
I haven’t noticed that. Usually my templates/if-thens don’t result in blank values, though. I “usually always” output SOME value (eg. true and false NOT true and (blank)). I’ll keep an eye out.
Using Template/If-Then-Else to create columns where no data appears in certain rows based on conditions within the sheet would allow you to create instant filtering/visibility in pretty powerful ways. Example:
All users from one sheet are related to data in another sheet. But you want to make it so that if a user does something to one particular piece of data in that other sheet that they are suddenly restricted from doing that same thing to any other piece of data in that sheet that they are related too. You create relations and lookup columns to test that when they do something to a piece of data, a check appears in the column used as a lookup. With that check there, I can now prevent that user from doing anything else to any other rows of data they are related to (like data for example that they created), until they undo what they did to that one column and the check removes leaving that lookup column empty again.
My use case is for restricting users from having two drafts of a created post open at the same time. Posts are in one sheet and users are in another. This is the only way to do it, and currently, I can only do it through lookup on a sheets column… which has lag… which requires me to create other mechanics to compensate.
Still trying to wrap my brain around your use case.
- So the posts sheet, a value gets generated (via if then) when a post is drafted?
- In the users sheet, you’re doing a relation of email and then lookup of that value?
- If the value is present, filter out components, if the value isn’t present (empty data), components are visible?
That’s just one use case. I use it in a few different (similar) ways in my app. Some a bit harder to explain.
Instead of checking for empty, can you check for “Is not” or “Does not contain” then the value?
Not for lookup columns. It’s not an option. Only is empty or is not empty. If we could do what you’re describing it would be WORLDS easier.
“is not” wouldn’t make sense for a lookup column’s vis/filt condition since multiple relations could give it multiple pieces of data… but “does/does not contain” seems like a reasonable add to that.
Ah…for multiple relations, yes. You’re right. I’ve asked for a version of this, too…only has 1 vote .
Can’t do a template or an if-then or a math column on a lookup column filled with arrays. Empty or not empty.
I think @Robert_Petitto just alluded to this, but quick question, are you using a multiple relation or not? A single relation might give you more options for filtering.
It does. But I need multiple, for what I’m doing.
In general, I just find this odd with the little empty placeholders. Doesn’t happen if the lookup is on a sheets column… why on a template or if-then-else?
Got it. Now I understand.
How about 2 templates with ‘email - TRUE’. Then set up your relation against the templates?
I’m reluctant to call this a bug, because might just be the way they need it for now… but if it eventually is updated, I’ll be able to swap out a few lookups on sheets columns with ones on Glide columns instead and have instant data change reflected in the app.
Still gives those multiple empty placeholders if you’re doing a lookup on a template or if-then of any kind.
Shouldn’t if your posts sheet has an if then to set true, then a template to join email and the if column. Only the ones with a true will be returned in the relation.