Filtering By Logged In User

Hey All! I was hoping someone could assist with some direction. I have been struggling for a few of days now on this 1 part ( learnt google sheets really well in this time but maybe I’m missing something or going about it the wrong way.

I am currently having a problem filtering my items sheet, based on logged in user.

I have an “Items sheet” with unique rows in it. I need to be able to show only items that the logged in user has not previously selected ( selected = setting a switch via a form to “YES” on the individual items themselves. )

I am trying to avoid having duplicate rows in the items sheet, due to needing a duplicate item for each user. imagine 200 users and 200 items, for every item I would need 200 users.=40,000 rows

I was thinking about creating a matrix on separate sheet, of all the items and if the user had accepted them or not, then using CONCATENATE to put them all into 1 cell on the “Items Sheet” but this would require glideapp to be able to have a second filter option ( i am using a filter already) and ability to set that filter to “CONTAINS” and ability to also select “Logged In User” as the data set.

Does anyone have any thoughts or guidance at all? Is this a non issue or is it something that is known to be tough/impossible at the moment?

Thanks for any help folks! if I can overcome this, then ill be on track to completing this project :slight_smile:

1 Like

I think you’re asking about the per user data function. Filtering by user starts with going into the settings on the left side panel in glide, then switching into privacy menu on the right side panel. You then choose either public with email or whitelist as a way for your users to access the app. Once either of these are selected, you can choose any screen/tab that you are working from to be filtered or not filtered by logged in user.That filter is found in layout menu on the left panel, then go to the screen in your app that you want filtered, go to features on the right panel and check the box under user data. The email it is filtering by will appear. You can change the amail to see what each user will see. I hope this helps.

Hiya, thanks you for your reply :slight_smile: I already have understanding of Glide and per user functions. I have per user filters set up on other sheets.

I need to be able to filter the items tab by items that users didn’t select in past. (users can only select one item)

the only way I can see is to have rows like this :
Row 1 - item 1 - all item details and 1 user that can see this item
Row 2 - Item 1 - all item details - next user that can see this
Row 3 - item 1 - all item details - next user that can see this
Row 4 - item 1 - all item details - next user that can see this
and so on…

If I have say 200 + users and 200 + items, i will need 40,000 rows.
Also I am trying to avoid having to manually add each reference to ever individual reward. i need this to be in an “in-line list” since the amount of items makes it no feasible to enter these myself.

is there something else I can do?

@Phil Take a look at this spreadsheet I created it as a demo for another topic on using iframes (which is a no no at this point for Glide, so ignore that part.) That said it uses the concept that you stated above. The “40,000” item sheet is the sheet called FormsbyEmail. It combines two sheets formsdata and directorydata. So in the case where each would have 5 items you would end up with 25 items on the FormsbyEmail sheet.

Hey @George_B, thanks for reply. exactly. I am trying to avoid this method. I am making an automated system for creating item listings. The number of listings and users could be quite a lot (i have to plan for that at least) 200 users would be very low for this type of system I am trying to make in glideapp.

To be able to filter by logged in user and make this happen seems to be eluding me. I was hoping I had missed something or gone about it the wrong way.

In order to filter by user you obviously need to use one of the email log in methods. The you can set any view to only show rows from a sheet that are for that email. There has to be a column in the sheet that holds the email for you to pull that off. What you can’t do is have multiple users (meaning 5 out of 20 users) see the same row however. Maybe a bit more detail or a sample spreadsheet you could share would help understanding of what you are trying to accomplish. There is a tutorial for that on the Glide site.

I was trying to add all the users to 1 cell on the row using CONCATENATE function. but I cant filter by “Contains”

If it could filter by “logged in user” by a column that “contains” a value rather than, cell “is” a value, this could be resolved I feel.
(I assume the current set up for Filter by logged in user is : column “is” the users email. I would like to see the ability to be able to add the users emails to 1 cell, then filter by cell contains the current users email. This would enable 1 row for each item avoiding 40,000 plus rows in any sheets.

i.e.

@JackVaughan any thoughts? viable for a feature request?

Your assumption is wrong. To filter by logged in user email is separate than the filter part you are referring to.

Just to be clear, you want it to function like favorites, but backwards? So, for example, all items would show up, you flip a switch, then it disappears? I see what you are saying with the matrix. I’m attempting something similar, but have quickly run into Google sheet size limitations.

If you have a set number of user emails that you are working with, I believe you can create an array of emails for each row. Set up columns like this (Email 1, Email 2, Email 3 etc.) Then you can use the array column that glide creates (Email) for per user data.

Hey @Jeff_Hager, Thanks for reply. Yes that’s what i’m trying to do.

I guess its like favorites but backwards… I want everyone to see the full list of items, then as they “accept” one, its removed from the list.
I have tried creating an array of emails for each row, but I cant get glide to filter this since its data on rows not columns.

may I ask what you mean by Using the array column that glide creates?

(re the set number of emails, I have a formula to add a new column heading when a new user had logged in to allow more users automatically without me adding them all each time.)

Heya, I know that part is separate from the filter part i was talking about. I was trying to say that in the back end of the “Filter Rows by Signed In User” was likely a “Cell is…” rather than a “cell contains …”

If we had ability to change that to “cell contains”, I could CONCATENATE all the users emails into 1 cell for each row, then it would look through the cell for the signed in users email and filter it.

I also mentioned that a new filter could be added in the filters section with the following ability :
COLUMN - CONTAINS - SIGNED IN USER

There is a post towards the bottom of this thread that refers to what I was talking about.
It would work similar to an image array that lets you swipe through multiple images in a single image component except you would use the Per User Data filter instead that @George_B mentioned above.


I’m not sure off the top of my head, but you could maybe somehow set up the sheet through scripting or formulas to remove the particular users email from a column when they flip a switch or check a box via a form submission. I don’t know how that would work though. As for you creating columns automatically for new users, I don’t think that plays well with glide unless you reload the sheet in the app builder, but maybe it would work as long as you are using a column array. Something to play with.

Here is a link that explains how image arrays work.

https://docs.glideapps.com/all/guides/intermediate-techniques/working-with-images#image-carousel

I like your ideas for new filter options. I’m sure they will be added in due time.

2 Likes

I seem to remember that I had used a filter by email login on a sheet that had said email column. I couldn’t figure out why I saw more than one listing for a given logged in person, I expected just one. It turned out that they were seeing all the rows that had no email entered in that column for email. So if this is the case would it work for you. The user would select that row if info and put their email into the email column for that row. From that point forward they would be the only one to see that row, along with all the other rows that still had no email in them.

The way I understand it is he doesn’t want to see a row. Much like a To-Do list where you check off an item and it disappears. I think the problem is that he is using the same list for multiple people, so everyone would have the same To-Do list, but each person could check off and remove the list item individually.

Hey @Jeff_Hager amazing info thanks! you know, the matrix i mentioned i was working on, auto populated the column headers based on the number of new users in the system and then auto populated the emails of the people that could view the items. I was just missing this bit :

however I cant get it working at the moment.

@Mark sorry to bother you sir, I have tried the above and cannot get it working. are you able to shed any light on it? I have the following sheet to test this :


What am I missing? you said to make sure the email column was selected and enter 1 email per column. Do I have to populate the email column at all? or leave it blank?

shared sheet here : https://docs.google.com/spreadsheets/d/1zQ1EKt-LIaD4fhfLloAZyj9WhAUTMnZoJ0EAS1hSQLE/edit?usp=sharing

Thanks everyone for help :slight_smile:

Try removing your “Email” column entirely. You should only have the numbered columns. Glide will recognize the array and show an"Email" column in the builder.

2 Likes

Absolute Star!! first test worked. going to have a play with it :stuck_out_tongue: Thanks!

1 Like