# I cannot display the result of a query in my app

**URL:** <https://community.glideapps.com/t/i-cannot-display-the-result-of-a-query-in-my-app/80361>\
**Category:** Ask for Help\
**Created:** [February 26, 2025, 8:52am UTC](https://community.glideapps.com/t/i-cannot-display-the-result-of-a-query-in-my-app/80361 "2025-02-26T08:52:57Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![APERAF](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/aperaf/32/82876_2.png) [@APERAF](https://community.glideapps.com/u/APERAF)\
**Post date:** [February 26, 2025, 8:52am UTC](https://community.glideapps.com/t/i-cannot-display-the-result-of-a-query-in-my-app/80361/1 "2025-02-26T08:52:57Z")

</div>

* * *

**Team ID:**

- In the Glide dashoard URL  
`https://go.glideapps.com/o/EDSdKuPL1W2u9NipVrQn`

**App ID:**

- In the Glide builder URL  
`https://go.glideapps.com/app/2fqZTPKeDqu1HqyptOEe/layout`

**Description**  
I created a column to retrieve some data in another table through the query function.  
I tried to display the data from that column in my layout but I don’t see the way to do it since the layout doesn’t give me the possibility to select the data.

**How to replicate**

- Create a column using the relation function to another table (see in the image bellow the “Créneaux” column in my “Collabs” table)
- Use a query function to retrieve a data from the relation column (see in the image bellow the “Créneaux de la collab” column in my “Collabs” table)
- Try to display the result of the query function in the layout (see in the image bellow)

 ![Screenshot 2025-02-26 at 09.47.19](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/5/9/59240f187b25072f5d14ae37e4c335ad2cfe8884.png)  
 ![Screenshot 2025-02-26 at 09.46.51](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/1/3/1361201da91a6e322057d28f22dfae5275015f19.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:** [February 26, 2025, 9:07am UTC](https://community.glideapps.com/t/i-cannot-display-the-result-of-a-query-in-my-app/80361/2 "2025-02-26T09:07:34Z")

</div>

This is not a bug. You cannot reference a Query column in a Fields component, or any other component that expects a single value.

Use a Collection component instead.

---

<div class="post-metadata">

**Author:** ![APERAF](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/aperaf/32/82876_2.png) [@APERAF](https://community.glideapps.com/u/APERAF)\
**Post date:** [February 26, 2025, 9:14am UTC](https://community.glideapps.com/t/i-cannot-display-the-result-of-a-query-in-my-app/80361/4 "2025-02-26T09:14:21Z")

</div>

Oh ok thank you but actually I use a lookup to retrieve a single value from the result of the query and it doesn’t work either. Is that normal?

---

<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:** [February 26, 2025, 9:17am UTC](https://community.glideapps.com/t/i-cannot-display-the-result-of-a-query-in-my-app/80361/5 "2025-02-26T09:17:59Z")

</div>

A lookup via a query will return an array. Use a single value column to fetch the value that you need.

---

<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:** [February 26, 2025, 12:46pm UTC](https://community.glideapps.com/t/i-cannot-display-the-result-of-a-query-in-my-app/80361/6 "2025-02-26T12:46:59Z")

</div>

Why are you creating a query on top of a relation? You shouldn’t need the relation.

---

<div class="post-metadata">

**Author:** ![APERAF](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/aperaf/32/82876_2.png) [@APERAF](https://community.glideapps.com/u/APERAF)\
**Post date:** [February 26, 2025, 4:34pm UTC](https://community.glideapps.com/t/i-cannot-display-the-result-of-a-query-in-my-app/80361/7 "2025-02-26T16:34:28Z")

</div>

Ok thanks I think I have found the solution. I used the query to get the result directly (without the relation) and then I fetched the value through the single value function. There I can display the single value easily. It works!

Thank you very much. 😁

---

<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:** [March 5, 2025, 4:34pm UTC](https://community.glideapps.com/t/i-cannot-display-the-result-of-a-query-in-my-app/80361/8 "2025-03-05T16:34:45Z")

</div>

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