# Relations to columns with blank rows of data

**URL:** <https://community.glideapps.com/t/relations-to-columns-with-blank-rows-of-data/5794>\
**Category:** Ask for Help\
**Created:** [March 24, 2020, 7:43pm UTC](https://community.glideapps.com/t/relations-to-columns-with-blank-rows-of-data/5794 "2020-03-24T19:43:03Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![John\_Cabrera](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/john_cabrera/32/2066_2.png) [@John\_Cabrera](https://community.glideapps.com/u/John_Cabrera)\
**Post date:** [March 24, 2020, 7:43pm UTC](https://community.glideapps.com/t/relations-to-columns-with-blank-rows-of-data/5794/1 "2020-03-24T19:43:03Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![Robert\_Petitto](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/robert_petitto/32/25193_2.png) [@Robert\_Petitto](https://community.glideapps.com/u/Robert_Petitto)\
**Post date:** [March 24, 2020, 7:49pm UTC](https://community.glideapps.com/t/relations-to-columns-with-blank-rows-of-data/5794/2 "2020-03-24T19:49:02Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![John\_Cabrera](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/john_cabrera/32/2066_2.png) [@John\_Cabrera](https://community.glideapps.com/u/John_Cabrera)\
**Post date:** [March 24, 2020, 8:02pm UTC](https://community.glideapps.com/t/relations-to-columns-with-blank-rows-of-data/5794/3 "2020-03-24T20:02:44Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Robert\_Petitto](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/robert_petitto/32/25193_2.png) [@Robert\_Petitto](https://community.glideapps.com/u/Robert_Petitto)\
**Post date:** [March 24, 2020, 8:21pm UTC](https://community.glideapps.com/t/relations-to-columns-with-blank-rows-of-data/5794/4 "2020-03-24T20:21:08Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![John\_Cabrera](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/john_cabrera/32/2066_2.png) [@John\_Cabrera](https://community.glideapps.com/u/John_Cabrera)\
**Post date:** [March 24, 2020, 8:23pm UTC](https://community.glideapps.com/t/relations-to-columns-with-blank-rows-of-data/5794/5 "2020-03-24T20:23:05Z")

</div>

- correct
- correct
- correct

---

<div class="post-metadata">

**Author:** ![John\_Cabrera](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/john_cabrera/32/2066_2.png) [@John\_Cabrera](https://community.glideapps.com/u/John_Cabrera)\
**Post date:** [March 24, 2020, 8:24pm UTC](https://community.glideapps.com/t/relations-to-columns-with-blank-rows-of-data/5794/6 "2020-03-24T20:24:31Z")

</div>

That’s just one use case. I use it in a few different (similar) ways in my app. Some a bit harder to explain.

---

<div class="post-metadata">

**Author:** ![Robert\_Petitto](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/robert_petitto/32/25193_2.png) [@Robert\_Petitto](https://community.glideapps.com/u/Robert_Petitto)\
**Post date:** [March 24, 2020, 8:25pm UTC](https://community.glideapps.com/t/relations-to-columns-with-blank-rows-of-data/5794/7 "2020-03-24T20:25:20Z")

</div>

Gotcha…multiple relation?

---

<div class="post-metadata">

**Author:** ![John\_Cabrera](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/john_cabrera/32/2066_2.png) [@John\_Cabrera](https://community.glideapps.com/u/John_Cabrera)\
**Post date:** [March 24, 2020, 8:25pm UTC](https://community.glideapps.com/t/relations-to-columns-with-blank-rows-of-data/5794/8 "2020-03-24T20:25:37Z")

</div>

Yup.

---

<div class="post-metadata">

**Author:** ![Robert\_Petitto](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/robert_petitto/32/25193_2.png) [@Robert\_Petitto](https://community.glideapps.com/u/Robert_Petitto)\
**Post date:** [March 24, 2020, 8:26pm UTC](https://community.glideapps.com/t/relations-to-columns-with-blank-rows-of-data/5794/9 "2020-03-24T20:26:00Z")

</div>

Instead of checking for empty, can you check for “Is not” or “Does not contain” then the value?

---

<div class="post-metadata">

**Author:** ![John\_Cabrera](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/john_cabrera/32/2066_2.png) [@John\_Cabrera](https://community.glideapps.com/u/John_Cabrera)\
**Post date:** [March 24, 2020, 8:27pm UTC](https://community.glideapps.com/t/relations-to-columns-with-blank-rows-of-data/5794/10 "2020-03-24T20:27:00Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![John\_Cabrera](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/john_cabrera/32/2066_2.png) [@John\_Cabrera](https://community.glideapps.com/u/John_Cabrera)\
**Post date:** [March 24, 2020, 8:30pm UTC](https://community.glideapps.com/t/relations-to-columns-with-blank-rows-of-data/5794/11 "2020-03-24T20:30:23Z")

</div>

“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.

---

<div class="post-metadata">

**Author:** ![Robert\_Petitto](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/robert_petitto/32/25193_2.png) [@Robert\_Petitto](https://community.glideapps.com/u/Robert_Petitto)\
**Post date:** [March 24, 2020, 8:33pm UTC](https://community.glideapps.com/t/relations-to-columns-with-blank-rows-of-data/5794/12 "2020-03-24T20:33:52Z")

</div>

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.

 ![Screen Shot 2020-03-24 at 4.33.02 PM](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/2X/3/31db1a59fe149ce162ca07f3feb65ca7d9f31e2d.png)  
 ![Screen Shot 2020-03-24 at 4.33.20 PM](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/2X/6/64a6e2391fd811c56416ab8d030cd799983e08d2.png)

---

<div class="post-metadata">

**Author:** ![Jeff\_Hager](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/jeff_hager/32/43_2.png) [@Jeff\_Hager](https://community.glideapps.com/u/Jeff_Hager)\
**Post date:** [March 24, 2020, 8:35pm UTC](https://community.glideapps.com/t/relations-to-columns-with-blank-rows-of-data/5794/13 "2020-03-24T20:35:34Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![John\_Cabrera](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/john_cabrera/32/2066_2.png) [@John\_Cabrera](https://community.glideapps.com/u/John_Cabrera)\
**Post date:** [March 24, 2020, 8:36pm UTC](https://community.glideapps.com/t/relations-to-columns-with-blank-rows-of-data/5794/14 "2020-03-24T20:36:06Z")

</div>

It does. But I need multiple, for what I’m doing.

---

<div class="post-metadata">

**Author:** ![John\_Cabrera](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/john_cabrera/32/2066_2.png) [@John\_Cabrera](https://community.glideapps.com/u/John_Cabrera)\
**Post date:** [March 24, 2020, 8:37pm UTC](https://community.glideapps.com/t/relations-to-columns-with-blank-rows-of-data/5794/15 "2020-03-24T20:37:53Z")

</div>

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?

![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/2X/5/5ac3b11d9959935281abbf44fd00945ac9dda511.png)

---

<div class="post-metadata">

**Author:** ![Jeff\_Hager](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/jeff_hager/32/43_2.png) [@Jeff\_Hager](https://community.glideapps.com/u/Jeff_Hager)\
**Post date:** [March 24, 2020, 8:39pm UTC](https://community.glideapps.com/t/relations-to-columns-with-blank-rows-of-data/5794/16 "2020-03-24T20:39:17Z")

</div>

Got it. Now I understand.

---

<div class="post-metadata">

**Author:** ![Jeff\_Hager](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/jeff_hager/32/43_2.png) [@Jeff\_Hager](https://community.glideapps.com/u/Jeff_Hager)\
**Post date:** [March 24, 2020, 8:40pm UTC](https://community.glideapps.com/t/relations-to-columns-with-blank-rows-of-data/5794/17 "2020-03-24T20:40:33Z")

</div>

How about 2 templates with ‘email - TRUE’. Then set up your relation against the templates?

---

<div class="post-metadata">

**Author:** ![John\_Cabrera](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/john_cabrera/32/2066_2.png) [@John\_Cabrera](https://community.glideapps.com/u/John_Cabrera)\
**Post date:** [March 24, 2020, 8:40pm UTC](https://community.glideapps.com/t/relations-to-columns-with-blank-rows-of-data/5794/18 "2020-03-24T20:40:38Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![John\_Cabrera](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/john_cabrera/32/2066_2.png) [@John\_Cabrera](https://community.glideapps.com/u/John_Cabrera)\
**Post date:** [March 24, 2020, 8:42pm UTC](https://community.glideapps.com/t/relations-to-columns-with-blank-rows-of-data/5794/19 "2020-03-24T20:42:17Z")

</div>

Still gives those multiple empty placeholders if you’re doing a lookup on a template or if-then of any kind.

---

<div class="post-metadata">

**Author:** ![Jeff\_Hager](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/jeff_hager/32/43_2.png) [@Jeff\_Hager](https://community.glideapps.com/u/Jeff_Hager)\
**Post date:** [March 24, 2020, 8:44pm UTC](https://community.glideapps.com/t/relations-to-columns-with-blank-rows-of-data/5794/20 "2020-03-24T20:44:06Z")

</div>

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.

[Next page](https://community.glideapps.com/t/relations-to-columns-with-blank-rows-of-data/5794.md?page=2)
