# How do I lookup the value of a Boolean field in another table?

**URL:** https://community.glideapps.com/t/how-do-i-lookup-the-value-of-a-boolean-field-in-another-table/64119
**Category:** Ask for Help
**Created:** [July 19, 2023, 2:51pm UTC](https://community.glideapps.com/t/how-do-i-lookup-the-value-of-a-boolean-field-in-another-table/64119 "2023-07-19T14:51:42Z")
**Posts on this page:** 17
**Page:** 1

<div class="post-metadata">

### Author: ![Todd\_Callen](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/todd_callen/32/61512_2.png) [@Todd\_Callen](https://community.glideapps.com/u/Todd_Callen)
#### Post date: [July 19, 2023, 2:51pm UTC](https://community.glideapps.com/t/how-do-i-lookup-the-value-of-a-boolean-field-in-another-table/64119/1 "2023-07-19T14:51:42Z")

</div>

The Setup:  
I have a Missions table that has all possible missions and a Missions Log table that has submissions for those missions from various users. In the Missions Log table, I have a Boolean “Approved?” column.

Goal:  
Filter Missions screen so that only Approved missions for the logged in user show up.

What I can already do:  
I can already filter that screen by whether or not the user has SUBMITTED a log entry for missions, but that only requires the user email and mission name.

What I can’t figure out:  
How do I set up my Missions table so that I can filter by Approved (Boolean) status?

Thanks in advance.

---

<div class="post-metadata">

### Author: ![Darren\_Murphy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darren_murphy/32/47326_2.png) [@Darren\_Murphy](https://community.glideapps.com/u/Darren_Murphy)
#### Post date: [July 19, 2023, 2:53pm UTC](https://community.glideapps.com/t/how-do-i-lookup-the-value-of-a-boolean-field-in-another-table/64119/2 "2023-07-19T14:53:39Z")

</div>

You should be able to extend your existing filter, eg:

- Submitted By is Signed In User AND Approved is checked.

---

<div class="post-metadata">

### Author: ![Todd\_Callen](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/todd_callen/32/61512_2.png) [@Todd\_Callen](https://community.glideapps.com/u/Todd_Callen)
#### Post date: [July 19, 2023, 3:15pm UTC](https://community.glideapps.com/t/how-do-i-lookup-the-value-of-a-boolean-field-in-another-table/64119/3 "2023-07-19T15:15:27Z")

</div>

Yeah, there is a problem. That is not appearing on the Missions list because I couldn’t figure out how to port it over from the Missions Log entries. I also want to be able to add the Timestamp of the submission.

I got lost in the Lookup, Relation, etc. connections

---

<div class="post-metadata">

### Author: ![Darren\_Murphy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darren_murphy/32/47326_2.png) [@Darren\_Murphy](https://community.glideapps.com/u/Darren_Murphy)
#### Post date: [July 19, 2023, 3:19pm UTC](https://community.glideapps.com/t/how-do-i-lookup-the-value-of-a-boolean-field-in-another-table/64119/4 "2023-07-19T15:19:06Z")

</div>

Oh, sorry - I missed that you have two tables.

Question: I assume that each Mission can have multiple log entries, yes? If that’s the case, how would you determine if any given mission is approved? Does _all_ of its associated log entries need to be approved?

Can you show me a screen shot of both tables?

---

<div class="post-metadata">

### Author: ![Todd\_Callen](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/todd_callen/32/61512_2.png) [@Todd\_Callen](https://community.glideapps.com/u/Todd_Callen)
#### Post date: [July 19, 2023, 3:23pm UTC](https://community.glideapps.com/t/how-do-i-lookup-the-value-of-a-boolean-field-in-another-table/64119/5 "2023-07-19T15:23:27Z")

</div>

The log table has user-specific submissions for the various missions. The mission table just defines the missions themselves. It is the submissions that get approved, but when the user lists missions in the interface, he only sees his own.  
I want to make 3 separate views: 1 for assigned but not submitted (or approved), 1 for submitted but not yet approved, and one for approved.  
I will work on the screenshots, but the tables are now very wide.

---

<div class="post-metadata">

### Author: ![Todd\_Callen](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/todd_callen/32/61512_2.png) [@Todd\_Callen](https://community.glideapps.com/u/Todd_Callen)
#### Post date: [July 19, 2023, 3:27pm UTC](https://community.glideapps.com/t/how-do-i-lookup-the-value-of-a-boolean-field-in-another-table/64119/6 "2023-07-19T15:27:57Z")

</div>

I think these show what you need to see.

 ![Screenshot 2023-07-19 at 11.27.12 AM](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/2/6/26da78a83226bbb353ecbf5369438b53db5250ba.png)  
 ![Screenshot 2023-07-19 at 11.25.22 AM](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/e/6/e6243563582b78c0809f6343f960293e77479f26.jpeg)

---

<div class="post-metadata">

### Author: ![Darren\_Murphy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darren_murphy/32/47326_2.png) [@Darren\_Murphy](https://community.glideapps.com/u/Darren_Murphy)
#### Post date: [July 19, 2023, 3:36pm UTC](https://community.glideapps.com/t/how-do-i-lookup-the-value-of-a-boolean-field-in-another-table/64119/7 "2023-07-19T15:36:32Z")

</div>

Okay, cool.

I think you can leverage the [Query](https://www.glideapps.com/docs/reference/computed-columns/query-column) column here. And then you won’t need that “temp\_Mission User ID” column.

So in your Missions table, you could create a Query column that targets your Mission Log table and apply the following filters:

- Player Email is Signed In User, and
- Mission Name is This Row → Mission Name

Then you could use the Query column as the source of a collection on your Missions details screen, and filter it by the Approved boolean - either “is checked” (approved) or “is not checked” (not approved).

That will take care of two of your views. For your 3rd one, I assume you have a separate column in the Mission Log table that shows who it’s assigned to? If yes, you’d use that as an additional filter.

---

<div class="post-metadata">

### Author: ![Todd\_Callen](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/todd_callen/32/61512_2.png) [@Todd\_Callen](https://community.glideapps.com/u/Todd_Callen)
#### Post date: [July 19, 2023, 3:37pm UTC](https://community.glideapps.com/t/how-do-i-lookup-the-value-of-a-boolean-field-in-another-table/64119/8 "2023-07-19T15:37:36Z")

</div>

I’ve been trying to follow Robert Petitto’s tutorial walkthrough series videos, but I get stuck sometimes, even after rewatching sections several times. Sorry for the fuss.

---

<div class="post-metadata">

### Author: ![Darren\_Murphy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darren_murphy/32/47326_2.png) [@Darren\_Murphy](https://community.glideapps.com/u/Darren_Murphy)
#### Post date: [July 19, 2023, 3:38pm UTC](https://community.glideapps.com/t/how-do-i-lookup-the-value-of-a-boolean-field-in-another-table/64119/9 "2023-07-19T15:38:28Z")

</div>

Not a problem at all, we’re here to help 👍

---

<div class="post-metadata">

### Author: ![Todd\_Callen](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/todd_callen/32/61512_2.png) [@Todd\_Callen](https://community.glideapps.com/u/Todd_Callen)
#### Post date: [July 19, 2023, 3:39pm UTC](https://community.glideapps.com/t/how-do-i-lookup-the-value-of-a-boolean-field-in-another-table/64119/10 "2023-07-19T15:39:37Z")

</div>

On the last question, all missions are assigned (or available) to all students in the class, so I don’t need that filter.

I am still trying to get my mind around the differences between Relation, Lookup, Query, Single Value, etc.

I am making progress with your help, though.

---

<div class="post-metadata">

### Author: ![Todd\_Callen](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/todd_callen/32/61512_2.png) [@Todd\_Callen](https://community.glideapps.com/u/Todd_Callen)
#### Post date: [July 19, 2023, 3:40pm UTC](https://community.glideapps.com/t/how-do-i-lookup-the-value-of-a-boolean-field-in-another-table/64119/11 "2023-07-19T15:40:26Z")

</div>

Yeah, I think that the videos were made before the Query function came out. Fun, fun.

---

<div class="post-metadata">

### Author: ![Darren\_Murphy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darren_murphy/32/47326_2.png) [@Darren\_Murphy](https://community.glideapps.com/u/Darren_Murphy)
#### Post date: [July 19, 2023, 3:54pm UTC](https://community.glideapps.com/t/how-do-i-lookup-the-value-of-a-boolean-field-in-another-table/64119/12 "2023-07-19T15:54:06Z")

</div>

> [@Todd\_Callen](#):
>
> I am still trying to get my mind around the differences between Relation, Lookup, Query, Single Value, etc.

Yeah, it takes a while to get your head around all the computed column types, and how to use them effectively.

- Relation: establishes a link between one row and one or more other rows based on matching values. A single relation returns the first matching row, a multiple relation returns all matching rows.
- Lookup: used to fetch a specific column value via a relation. If used with a single relation, it returns a single value. If used with a multiple relation (or a query), it returns an array. Lookups can also be used outside of relations, for example to create an array from an entire column of data.
- Query: basically relations on steroids. They allow you to create conditional relations by applying filters, and then sort and/or limit the results.
- Single Value: Picks a single value from a column, relation, query. Has many uses. I won’t try and list them all now 🙂

---

<div class="post-metadata">

### Author: ![Todd\_Callen](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/todd_callen/32/61512_2.png) [@Todd\_Callen](https://community.glideapps.com/u/Todd_Callen)
#### Post date: [July 19, 2023, 8:56pm UTC](https://community.glideapps.com/t/how-do-i-lookup-the-value-of-a-boolean-field-in-another-table/64119/13 "2023-07-19T20:56:41Z")

</div>

I accidentally broke my mission submission process by deleting the form on the Mission detail page of the Missions To Do dataset. I got most of the fields working again except the current user email for the submission.

Hint?

---

<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: [July 19, 2023, 9:51pm UTC](https://community.glideapps.com/t/how-do-i-lookup-the-value-of-a-boolean-field-in-another-table/64119/14 "2023-07-19T21:51:38Z")

</div>

Add a new component to the form. You will see Special Value components…of which one of them is email.

---

<div class="post-metadata">

### Author: ![Todd\_Callen](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/todd_callen/32/61512_2.png) [@Todd\_Callen](https://community.glideapps.com/u/Todd_Callen)
#### Post date: [July 20, 2023, 12:13am UTC](https://community.glideapps.com/t/how-do-i-lookup-the-value-of-a-boolean-field-in-another-table/64119/15 "2023-07-20T00:13:19Z")

</div>

I couldn’t ge that to work until I made it a custom, then it worked for some reason.

Thanks.

---

<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: [July 20, 2023, 12:36am UTC](https://community.glideapps.com/t/how-do-i-lookup-the-value-of-a-boolean-field-in-another-table/64119/16 "2023-07-20T00:36:19Z")

</div>

What do you mean by Custom?

---

<div class="post-metadata">

### Author: ![system](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/system/32/53398_2.png) [@system](https://community.glideapps.com/u/system)
#### Post date: [July 21, 2023, 12:36am UTC](https://community.glideapps.com/t/how-do-i-lookup-the-value-of-a-boolean-field-in-another-table/64119/17 "2023-07-21T00:36:53Z")

</div>

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.
