Glide reads blank search query (with reference to cell)

Guys, how are you? I have a problem.
I have this formula`=IFERROR(QUERY({GEOLOCALIZACAO!A2:G};“select * where Col5 contains ‘20220218’ AND Col6 contains ‘MORNING’”);"")

When I use single quotes and put the date I want manually, it works. When I refer to a cell, the glide returns the query blank.
=IFERROR(QUERY({GEOLOCALIZACAO!A2:G};“select * where Col5 contains “&L2&” AND Col6 contains ‘MORNING’”);"")

What am I doing wrong?

You’ll need to use a simple comparison operator.

I.e. <=, <, >, >=, =, !=, <>

Something like

=Query(A2:B,“Select * where A <= date '”&TEXT(D1,“yyyy-mm-dd”)&"’")

1 Like

Tks…
I tried and it didn’t work. The cell I’m looking for has the formula =Today().
Is it because of that?

Is this something that would be much better off using Glide’s built in functionality? This like something that could be easily achieved with relation and lookup columns. Or are you trying to avoid directly associating the GEOLOCALIZACAO sheet with the glide app?

I have a tab called morning where I look for two pieces of information: today and morning in the Geolocation tab. I need to return only the lines that contain this information.

It works…

1 Like