How to Add "filter" of List Page from User Profile

I believe I know the answer to this, but want to make sure I’m implementing best.

It looks like to do this I need to add an IF ELSE THEN column in the Sheet I want to add a "user preference filter’ to, that looks at the User Profile, and pulls it into the sheet.

Then I’ll be able to add the filter based on the User Profile preference the user has set.

This workaround is required because you can’t access the ‘user profile’ from a LIST page’s FILTER.

i do not understand what you want explain better

You can’t add a TAB “LIST” filter USING columns from “User Profiles”, because the ‘tab’ filter doesn’t show the “User Profile” columns in the drop down.

I’m looking at the best way to work around this.

1 Like

You can filter by user profile values on a list. Are you sure you are using the correct field in the filter? Do you have user profiles enabled?

Thanks @Jeff_Hager

I’ve looked again and the User Profiles just don’t appear at bottom like you have on yours for this LIST style tab. The sheet has a Row ID and some of its columns are user enabled, and working fine in the detailed views for the tab.

So I’m puzzled why User doesn’t appear. Am I missing something?

There is a difference between user profiles and user specific columns. They are not related. Have you enabled user profiles? It sounds like you are using and referring to user specific columns instead.

https://docs.glideapps.com/all/reference/privacy-and-per-user-data/user-profiles

I built our “user Profiles” using that documentation, and have been using it in other functionality a lot. I access data from the user’s profile to do unique math or other component work.

But… on this tab with style ‘list’ view, the option for the USER sheet isn’t coming up. Maybe I need to enable ‘user profiles’ in several places for it to be available everywhere?

The user profiles is only needed to be activated once, when you have a public with email app, go to the menu on the left, select the sign in option and assign a sheet. It will be available everywhere.

1 Like

Ok, so that’s all activated and working elsewhere in the app.

It’s just not available on this particular tab - seems like a bug at this stage? Something that may be conflicting or causing it to blip on it.

Can we see some related screenshots? Thank you.

Continuing the discussion from How to Add "filter" of List Page from User Profile:

Hi there,

I’m a relative newbie too… but have run into the same issue. I have User Profiles enabled and use them everywhere to allow the App to distinguish between an Admin User and a Read-Only user when it comes to Editing and the visibility of various components. However, there seems to be a blind spot when it comes to Filtering of Tab Data…

I set up most my Sheets with a column “Show on App”… set to either Yes or No. This allows me to put item data into the sheet and then by filtering the details with “Show on App” = Yes, I can switch items on and off so they do not appear on the Read-Only User’s screen…

The issue is that I would like my Admin User to be able to see everything (even items that have “Show on App” set to No)… When filtering the detail data however, you only get to choose the condition from the source Sheet for the Tab… and do not get to access a condition from the User Profile sheet… So you can “see” the User Profile data but only from within the filter value box ie

    If [Any item from the source sheet] is [any item from the User Profile Sheet]

Unless there is some kind of background linkage between the Items Source Sheet and the User Profile sheet, I see no way to filter by User Access Rights…

That is, I cannot filter the sheet as follows:

Show item if “Show on App” = Yes OR “User Access” = Admin…

Practically as things now stand, this means that if an item is visible, the Administrator can see it and use their access rights to edit it… but as soon as they set the “Show on App” to No they immediately lose visibility of the item… and the only way to bring it back into view is to kill off the filter for that Tab or manually go into the source sheet and change the item’s “Show on App” cell back to Yes.

Is that clear? What would fix this is if the CONDITION box under the filter would link directly to the User Profile sheet… Not just the VALUE box in the filter. This is the case when it comes to Editing rights and setting visibility conditions for Components; but is not the case when it comes to setting up Filters.

Love to know if I’m just doing something wrong or if someone has found a work-around? Thanks.

1 Like

Have you enabled user profiles?

Yes… I use them everywhere to enable Editing and visibility of Components. This issue occurs when Filtering a tab… that’s what the earlier contributor to this thread (qb15) was driving at…

This should not happen. Can you send us some screenshots?

First shot… I have a filter where Show on App is Yes
image

Second shot shows all the Condition fields that are available - note that none of them are from the Users sheet (but there should be!!!)
image

Third shot shows the Value field of the filter… You can see that here I can choose items from the User sheet… but they are useless in helping me build the filter since I need them in the Condition field… not here!

So, if the “User” fields appeared in the drop-down for the Filter Condition, we’d be sweet!

Thought I would add that the Layout for the Filter is a “List” Layout

I think a better strategy for you here is to have a template column to bring the user’s role inside the items sheet.

Then make an If Then Else column:

  • If Show in App = Yes then Yes.
  • If Template = Admin then Yes.
  • Else No.

Filter the screen by the ITE column is Yes.

Also, the user value only appears in the second field to prevent confusion.

It would be confusing for some users if they are able to “filter” a screen using the 1st condition that is not a value from their source sheet. Thus, only their Source sheet shows in the 1st field.

And even if that’s available, I think you’re confusing between filter and visibility here. Says they let you filter by user in the first field, what would a “User is Admin”, for example, return? User is not a column from that sheet, thus the confusion.

Thanks for looking at this.

Having to create another calculated column in the data sheet based on the User is a nasty solution… it’s counter-intuitive and seems to run against the reason for having User roles in the first place? It’s also calculation intensive… how does that work for two (or more simultaneous) logged in users? The Items sheet is doing an IF THEN ELSE calc on one column for every user? That doesn’t seem right…?

I am actually advocating for the very same options that are offered elsewhere for components and editing… Glide already does this for those other two features. See this screen shot:

image

Note that the Condition = “Access Level” from my User sheet while the “Value” it is comparing to is “Administrator”… a constant.

Currently, the filter set-up switches these two around… which in my mind is unusable?

“Filter these records by showing ITEMS where Condition1 = Value1 OR Condition2 = Value2” is easily understood… it’s just that Conditions1 and 2 need to be able to be grabbed from the ITEM sheet and/or the User sheet…

ie filter MYLIST: Show items where “Show on App” (from Item Sheet) = “Yes” OR “Access Level” (from the User Sheet) = “Administrator”…

ie if you are not an “Admin” user, the list will include only items that say “Show on App”… if you are an Admin user all items (those with “Show on App” set to anything) will be visible under that filter… Simple, straight forward.

In this case, the Filter is being used on the List Layout… so it is, in fact, a visibility filter (ie I am using a filter for the very purpose of making things conditionally visible or invisible)… So I don’t understand your last comment at all?

Perhaps I am misunderstanding?