I cannot display the result of a query in my app


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)


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.

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?

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

1 Like

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

1 Like

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. :grin:

1 Like

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