Query and Login - Error

Hey, guys,

I need to get the logged in user to help with the query.
**Where or how do I get the logged in user?

My Query => QUERY(A3:O,“select H WHERE K = '”& LOGGED IN USER &"’"))
I’ll make a SUM function after

Problem: I want to filter total user hours
Captura de Tela 2019-12-27 às 19.48.42

*below, TOTAL is wrong, because I didn’t get the logged in user
instead of 25.5 he calculated 46,5

It is not available from within the app. You could use the “User Data” setting and then put your formula on the individual row with the email of the user using the email from that row in your formula. You could then display that result on a per user basis.

1 Like

The glide logged in user is in your hidden section of your Google sheets.

I think the sheet says"Glide" logged in user or "App logged on/

Use it to reference the user to the data

1 Like

Hi Folks,

Ok I got it, but…Where or how do I get the logged in user? because we have App:Logins
is there other place?

You can submit a form and include the logged in user. Then your sheet could perform the query based on the email in the form response sheet. I’m not sure I quite follow what you are trying to do, but you can’t dynamically run a query from the app. The app displays whatever is currently showing on your sheet. I have invoicing in my app based on lessons that a coach gives. Any time data is entered in the sheet, my queries rerun and recalculate the amount due for that daterange/coach/student. Using unique keys I create for each record, I am able to create relations and display total amount due for each student, for that coach’s billing cycle. All of the data I need to display is already calculated in the sheet. My app isn’t trying to figure all this out on the fly based on the logged in user. It’s already calculated and I only show the correct data to the correct logged in user. Any time you add data, you just need to make sure you are including the email special value for the logged in user. Then you have all you need to run formulas and queries against the user.

1 Like

tks