Create a global variable for the logged in user

The email of a logged in user is available for Forms. Could you also make it available while creating a filter. Something like being able to type {{user.email}} in the “Enter value” box of the Filter dialog would solve a lot of peoples requests and be a great additional feature.

Maybe other globals like, Date (not date and time as that changes every millisecond), or Geolocation. I can think of use cases for the Date are pretty straight forward but for Geolocation the only thing I can think would require a specialized “Near” function with an additional input for distance. And then you have the miles vs. kilometers thing. But that would be handy for filtering on things near your current location.

8 Likes

Any update on this?

Yes, we’ll definitely get to that point.

2 Likes

any update on this? thanks and Happy new year!

Just wanted to see if there was any update on this? Thanks!

Anything in particular you are looking for? You can currently filter by signed in user and filter dates compared to today or now.

Hi Jeff! I’m looking to filter by a number range, where each user has a different number range they want to see.

For example, in a dating app, a user may only want to see other users aged 25 to 35, so I’m trying to filter the view for each user based on their preferences.

I’m currently using the new Filter option (the filter icon on the top right of the screen) to handle this, but was wondering if I’m missing anything to make the age range filter work in the inline-list filter.

Challenge accepted. Take a look at the Name/Age tab in my experiments app:
https://experiments.glideapp.io

@Robert_Petitto got it! the only thing there is I don’t think it would work with multiple users, because if one user changed the min and max, it would change the min and max for everyone?

True. There’s a solution in there somewhere. How do you envision the app working at a per user level?

@Robert_Petitto I know - there must be a solution somewhere! Imagine a dating app where individual users would select the age range they want to see. Then, when browsing users, only other users that have an age within their age range would be shown.

Would they change these preferences at some point? Do you have a list of age ranges they’d pick from?

Yeah, that’s the achilles heel of the Filters, Visibility, and If-Then columns in my opinion. It would be so much easier if we could compare column to column or a parent detail column to a child list column. This is especially complicated when you want to compare ranges of numbers to a dynamic user set range. You can do this in a google sheet, but you aren’t going to have the instant results as the google sheet would have to process the results from the user’s selections. I do something similar with dates. My users create a date range. Then in another sheet I use a query to find all of the lessons taught by that user withing the specified date range. It’s not pretty, but I don’t need instant search results, so it works for me.
=unique(query(Lessons!A1:I, "select A, E, I where 1=2 " & concatenate(arrayformula(if(LEN(InvoiceBillingCycle!A2:A) = 0, "", " or E='" & InvoiceBillingCycle!A2:A & "' and I>=date '" & TEXT(DATEVALUE(InvoiceBillingCycle!B2:B), "yyyy-mm-dd") & "' and I<=date '" & TEXT(DATEVALUE(InvoiceBillingCycle!C2:C), "yyyy-mm-dd") & "'"))) & "",2))
You could do something similar if you chose, but like I said, it would not be fast.

Once consideration I can think of would be to categorize each user into an age category (21-25, 26-30, 31-35, etc.). Using IF-Then statements, you could place each user into an age category based on their age. When a user is searching for other users, they could set a filter for a certain age category. This value could be used in a relation column to find all of the other users in the selected age category. You would display the relation as a list. I do something similar in the Dynamic List Filter in https://concepts.glideapp.io/.

I just want to also add that Glide has a User Specific Data column in staging. I really need to play with it to fully understand it, but it’s my understanding that each user can have their own values, so these aren’t columns that are written to the sheet. This would be great for filtering, since you wouldn’t need to maintain a row for each signed in user.