How to add functionality for the user to select who sees their profile

Hey friends!

I am working with a client who has members with different certification levels. They currently select their level in a drop-down within their user profile.

She recently asked if we can make a way for the user to decide which certification levels they want their profile to be shown to.

We have a directory of all profiles in the app with a filter for certification levels, but that’s not quite what she’s wanting here. Any way to accomplish this?

So how many levels do you have? Do you mean that:

  • Each user has a certification level.
  • Each user should be able to choose something like: “I only want my profile to be shown to users whose certification level is at least X”

Each user selects a certification level from a dropdown within their user profile to identify their level. Options are Student, Certified, and Master.

Then, yes, the client wants the user to experience what you described:

Each user should be able to choose something like: “I only want my profile to be shown to users whose certification level is at least X”

I would have a helper table where you house all those choices and an equivalent number.

Choice Number
Student 1
Certified 2
Master 3

Then in your Users table, use 2 relations to link the profile type choice and the filter choice to the helper table above, use a lookup to bring back two numbers.

Add a query column pointing to the Users table. Filter by “Profile type number” greater than or equal to “This row > Filter choice number”.

1 Like

@ThinhDinh’s suggestion should work here. Any time you need “at least” functionality, you should default to using a number schema. The helper table he describes to assign this number to the certification level will work well.

2 Likes

Thanks! Okay, so I want to make sure I am understanding this correctly so I can go implement.

By “helper” table, you mean just another table in Glide, yes? I am using Airtable so I would create another table of certification levels.

Then on the “Users” table, ad 2 additional “Lookup Fields” to the helper table. One is for the “User’s Certification Level” and the other is “Show my Profile to”. But instead of bringing back the name of the level, it returns the associated number.

Where does the query column go?

Also, this looks like it will only work with the logic of showing profiles greater than or equal to a certain level. As opposed to them just being able to select to show their profile to ONLY “Certified” or only to “Student” AND “Master”. Is that correct? I want to be able to communicate the caveats/limitations to the client.

Yeah, usually I add a “Choices” table to my app to house things like this.

Before the lookup fields, you would have to create a relation using the name of the levels they chose, then returning the associated number.

The query column goes in the Users table.

If you want it this way, the query would be constructed as: Filter by “Profile type number” equal to “This row > Filter choice number”.

1 Like