Can you filter info based on a code (rather than by email)?

I’d like to use Glide for a project with my class. Students are working in groups of three, but they do occasionally change groups.

Using the ‘relations’ function, I’d like to be able to display information to individual users depending on a ‘group code’ that they enter (not—which is obviously easier—dependent on their email address, because I don’t want to have to keep track of which group they’ve moved to).

I’ve got everything working except the ‘group code’ idea. I can’t work out how to get a user’s input to not overwrite another’s (ie, move down to the next cell in a column).

Any ideas about how to do this?

@James_Castleden I think you can accomplish what you want but I would need to see the structure of the spreadsheet. Maybe just understanding what sheets you have. Obviously Students, which would hold their email and “normal” group code if that is the case. And then maybe Groups. Do you have one for Assignments? Also I’m unclear as to at what point they put the group code in and where that group code is stored. I think you can pull it off but it’s all about data and how it is structured.

Hi George. Thank you for taking a look into this.

Here is a copy of the spreadsheet as it is currently laid out: https://docs.google.com/spreadsheets/d/1iDc6gylvCPYYfJqZbQnLiq-y1gwlvez4fPQrggl-9FI/edit?usp=sharing

The idea is that:

  • STAGE ONE: groups will add details about their ‘product’ in the first sheet (that tab will be editable at this stage).
  • STAGE TWO: Make the ‘details’ uneditable and allow everyone to see them.
  • STAGE THREE: Students read about the other groups’ ‘product’, and then ‘vote’ on the best product by assigning ‘funding’ to the other groups.

The reason for the ‘group code’ is so that, during the editing process in STAGE ONE, there will be no temptation to sabotage other groups’ work because they won’t be able to see the other groups’ work until STAGE TWO.

Ok. You have a few steps to get this to work I think.
Step one: take a look at this spreadsheet: https://docs.google.com/spreadsheets/d/1eHximw7fX-88kzpvq6RRmpkIZHoCucRW9GSE6SieSjM/edit?usp=sharing

It’s a copy of yours but I added a few sheets, and renamed one of them. I also added a column to the sheet I renamed.

The second sheet is a copy of the first one using two arrayformulas. This would be the one you use for your STAGE TWO. It would show as an additional page in your app. You can control if the content is viewable by all with cell B2 on sheet AppSettings. More on that later, but for now you can toggle it true and false and see the result. You would toggle this after Stage one is completed.

The column I added to Players (you had named it Group Codes if I remember correctly) will be what is shown as your Home Page. It has the “Players” email, the person logged in. In the app you can set this to only show the single row of the person who is logged in. The added column is the one that points to their Group and you can have a component that would then open the details of that row, but only the details of the Group they belonged to. This is where they would edit the info in Stage ONE.

Get this set up and the try and tackle your Stage 3.

As I’m re-reading your original post I have some reservations about some assumptions I have made. When you say you “don’t want to keep track of which group they’ve moved to” you are saying that they can change groups at will?

Also I’m not fully understanding what you mean by " I can’t work out how to get a user’s input to not overwrite another’s (ie, move down to the next cell in a column)." If you have three students working together in a Group, they would all have access to that group and they would be editing the same cells. So they would be able to overwrite and change anything in their group.

Why don’t you write a narrative on the whole process. Try to not think about what you have done so far in Glide or the spreadsheet. You have to figure out all of the pieces to the puzzle before you start to assemble it, if that makes any sense to you.

Hi George; thank you so much for taking the time to help me with this.

There’s one thing I’m battling with. You say ‘In the app you can set this to only show the single row of the person who is logged in’. How do I do that exactly? I’ve tried using the filter option but can’t work out how to do it.

Everything else is working fine, so thanks again :slight_smile:

Aaahh, got it. You don’t do it that way. You check the box under USER DATA on in that same area. Filter rows by signed-in user. Of course you need your app set to either Public with email or Whitelist email. Then in the developer you can select which user to use as the logged in user for testing purposes while in the Glide app developer.

Of course! That makes sense. Thanks so much George.

So now my landing page is on ‘details’ display, and a logged in user enters a code and the code is saved next to his email.

Now I just need to figure out how to check whether the code they enter is acceptable against a database of codes. ie, if they enter ‘Group2Code’ in the text field, that’s checked against the nine possible codes, and, since it is the correct code for group 2, only the details for group 2 are displayed, ready to be edited.

That’s gonna be a formula in Google Sheets itself, right? Do you know which formula I should be looking up to do this? Something with IF() I guess…

The code is a one time deal. It’s just to verify that they put in a valid email that they have access to. From that point on they can just open the app but the app “knows” who they are by their email address. You have access to that email address in various components and in the places I mentioned before.

Use a choice component for them to select the group code instead of a text field. If you don’t already have a list of unique group codes somewhere in you spreadsheet, you can add it to a new sheet using UNIQUE. Once you have a unique list of group codes, they can be used for the choice component.

https://support.google.com/docs/answer/3093198?hl=en

Thank you both for your answers.

I’m probably not making myself very clear so I’ve attached a PDF with screenshots of what I’m trying to do: https://www.dropbox.com/s/rxkaeux47nrtgeh/glide%20group%20work.pdf?dl=0

Here is the Sheets doc too, if it’s needed: https://docs.google.com/spreadsheets/d/1oefCCQJvdA5PSbJ6QFx3bNwJ8FBNm2dfm9NTzTqLBhQ/edit?usp=sharing

I really appreciate your help with this. Group work is extremely important in my classes and if I can get it to work with Glide it would make a world of difference to my students.

Please ignore all that! I get it now… using GroupLink in the first sheet. Thanks!

1 Like

Your PDF says you’re still having trouble validating group codes. Use the choice component like I indicated in my previous post. That way they can select from a list instead of typing it in.

If they selected from a list, then everyone would see all the codes and then sabotage of other groups’ might take place…

Ok, now I get it. So it’s kind of like a password. I’m not thinking of a good solution for validation in that case. However, something to think about: You CAN have multiple emails per row and use Per User Data. You would need 3 columns in your Product Details sheet. Label them “Email 1”, “Email 2” and “Email 3”. Then when turning on Per User Data in the app builder, you would point it to “Email”. Glide creates the “Email” column, which represents an array of the other 3 email columns. This way you could possible eliminate the Enter Code portion of the app.

Thanks Jeff

George has showed me how to do it so I’m going to post the final version along with the Sheet so you can see how it works.

Thanks for your help anyway!

2 Likes